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: Yao Qi <yao at codesourcery dot com>
- To: Doug Evans <dje at google dot com>, Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Wed, 13 Aug 2014 09:49:58 +0800
- 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>
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.
--
Yao (éå)