This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix wrong assertions
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: Yao Qi <qiyaoltc at gmail dot com>, Andreas Schwab <schwab at linux-m68k dot org>, gdb-patches at sourceware dot org
- Date: Fri, 29 May 2015 17:33:01 +0100
- Subject: Re: [PATCH] Fix wrong assertions
- Authentication-results: sourceware.org; auth=none
- References: <87vbg1eg08 dot fsf at igel dot home> <20150513140106 dot GB3023 at host1 dot jankratochvil dot net> <86bnh3pw61 dot fsf at gmail dot com> <20150529113101 dot GA15460 at host1 dot jankratochvil dot net> <86382fpki0 dot fsf at gmail dot com> <20150529141027 dot GA8159 at host1 dot jankratochvil dot net>
Jan Kratochvil <jan.kratochvil@redhat.com> writes:
>> > I did not realize that there can be self-tail-call:
>> > main(0x100) -> a(0x200) -> d(0x400)
>> > main(0x100) -> a(0x280) -> a(0x200) -> d(0x400)
>> > which intersects to:
>> > main(0x100) -> <???>? -> a(0x200) -> d(0x400)
>> > And so if the first chain was chosen the
>> > main(0x100) -> a(0x200) -> d(0x400)
>> > then the final intersection has callers+callees==length.
>>
>> What are the definitions of CALLERS, CALLEES, top and bottom? given
>> this example?
>
> top=CALLERS=main(0x100), therefore 1
> bottom=CALLEES=d(0x400), therefore 1
>
> top = topmost, where you can go by GDB "up" commands, also called "prev" in
> struct frame_info.
>
> bottom = bottommost, where you can go by GDB "down" commands, also called
> "next" in struct frame_info.
OK, I understand what does top/bottom mean. Since they are numeric
values, what does these number mean? for example, if CALLERS is 3 and
CALLEES is 2, what does the chain look like?
The code change in the patch looks reasonable to me, but comments change
doesn't, probably because I don't fully understand it. I'll take a
deeper look next Monday.
--
Yao (éå)