This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix wrong assertions


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 (éå)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]