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: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: Yao Qi <yao at codesourcery dot com>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Tue, 12 Aug 2014 14:28:52 -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> <20140812203845 dot GA18456 at host2 dot jankratochvil dot net>
On Tue, Aug 12, 2014 at 1:38 PM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> On Tue, 12 Aug 2014 22:32:55 +0200, Doug Evans wrote:
>> 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));
>
> I think we cannot and the reason is given in the comment there:
> # Append -Werror to CFLAGS so that configure can catch the warning
> # "assignment from incompatible pointer type", which is related to
> # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
> # in GDB, while babeltrace 1.0.3 is broken.
>
>
>> Or, if for some reason we need to test whether bf_ctf_get_iter exists,
>> can we just
>> call it and discard the result?
>
> Also not due to the reason above.
Alas the comment doesn't specify which assignment.
I think it's for scope.
I did some grepping:
@ruffy:babeltrace$ find babeltrace-1.0.3 -name '*.h' | xargs grep
bt_iter_get_pos
babeltrace-1.0.3/include/babeltrace/iterator.h: * - restore is a
position saved with bt_iter_get_pos, it is used with
babeltrace-1.0.3/include/babeltrace/iterator.h: * bt_iter_get_pos -
Get the current iterator position.
babeltrace-1.0.3/include/babeltrace/iterator.h:struct bt_iter_pos
*bt_iter_get_pos(struct bt_iter *iter);
@ruffy:babeltrace$ find babeltrace-1.1.0 -name '*.h' | xargs grep
bt_iter_get_pos
babeltrace-1.1.0/include/babeltrace/iterator.h: * - restore is a
position saved with bt_iter_get_pos, it is used with
babeltrace-1.1.0/include/babeltrace/iterator.h: * bt_iter_get_pos -
Get the current iterator position.
babeltrace-1.1.0/include/babeltrace/iterator.h:struct bt_iter_pos
*bt_iter_get_pos(struct bt_iter *iter);
@ruffy:babeltrace$ find babeltrace-1.0.3 -name '*.h' | xargs grep
bt_ctf_get_top_level_scope
babeltrace-1.0.3/include/babeltrace/ctf/events.h: *
bt_ctf_get_top_level_scope: return a definition of the top-level scope
babeltrace-1.0.3/include/babeltrace/ctf/events.h:const struct
definition *bt_ctf_get_top_level_scope(const struct bt_ctf_event
*event,
@ruffy:babeltrace$ find babeltrace-1.1.0 -name '*.h' | xargs grep
bt_ctf_get_top_level_scope
babeltrace-1.1.0/include/babeltrace/ctf/events.h: *
bt_ctf_get_top_level_scope: return a definition of the top-level scope
babeltrace-1.1.0/include/babeltrace/ctf/events.h:const struct
bt_definition *bt_ctf_get_top_level_scope(const struct bt_ctf_event
*event,
Note that there's no change in the result of bt_iter_get_pos, but
there is in bt_ctf_get_top_level_scope.
Plus some digging found this:
https://sourceware.org/ml/gdb-patches/2013-03/msg00955.html