This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch+7.8?] Fix --with-babeltrace with gcc-4.9.1
- From: Doug Evans <dje at google dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: Jan Kratochvil <jan dot kratochvil at redhat dot com>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Tue, 12 Aug 2014 20:05:11 -0700
- Subject: Re: [patch+7.8?] Fix --with-babeltrace with gcc-4.9.1
- Authentication-results: sourceware.org; auth=none
- References: <20140804202907 dot GA2608 at host2 dot jankratochvil dot net> <53E17E14 dot 8070104 at codesourcery dot com> <20140812192204 dot GA13299 at host2 dot jankratochvil dot net> <CADPb22S-e=fR9DCHQwMPaoKoTMfjjLk2C5_h3m5VJMBAXEE8Pg at mail dot gmail dot com> <53EAC446 dot 5060409 at codesourcery dot com>
On Tue, Aug 12, 2014 at 6:49 PM, Yao Qi <yao@codesourcery.com> wrote:
> On 08/13/2014 04:32 AM, Doug Evans wrote:
>> This seems like an excessive amount of code just to test whether a
>> library exists.
>> Do we really need all of it?
>
> IMO, it's better to keep them. When I use babeltrace in GDB, I find the
> babeltrace APIs are not stable, so I put more code in the configure
> test, to cover GDB usages.
>
>> E.g., can we just delete "pos" and the function call that initializes it?
>>
>> struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
>>
>> Or, if for some reason we need to test whether bf_ctf_get_iter exists,
>> can we just
>> call it and discard the result? [And similarly for the rest of the code.]
>> None of this code gets run anyways.
>
> As I said above, bt_iter_get_pos and bf_ctf_get_iter are here to test
> they still exist in the babeltrace library. They are in 1.1.0, but I am
> worried that they may be changed or renamed in the future.
Thanks.
I suspect it'll be useful to be able to refer to this reasoning at
some point in the future.
[ref: the "incompatible pointer type" warning is related to the
assignment to scope, not pos].
Maybe this thread is sufficient, or maybe you could add something to
the commit message.
Patch is ok with me.