[PATCH] Fix wrong assertions
Jan Kratochvil
jan.kratochvil@redhat.com
Sat May 30 07:44:00 GMT 2015
On Fri, 29 May 2015 18:33:01 +0200, Yao Qi wrote:
> OK, I understand what does top/bottom mean. Since they are numeric
> values, what does these number mean?
CALLERS and CALLEES together with LENGTH say what data is at what indexes of
CALL_SITE:
struct call_site_chain
{
/* Initially CALLERS == CALLEES == LENGTH. For partially ambiguous result
CALLERS + CALLEES < LENGTH. */
int callers, callees, length;
/* Variably sized array with LENGTH elements. Later [0..CALLERS-1] contain
top (GDB "prev") sites and [LENGTH-CALLEES..LENGTH-1] contain bottom
(GDB "next") sites. One is interested primarily in the PC field. */
struct call_site *call_site[1];
};
> for example, if CALLERS is 3 and
> CALLEES is 2, what does the chain look like?
main(0x100) -> x(0x150) -> y(0x200) -> <???>? -> a(0x200) -> d(0x400)
And if LENGTH is 7 then:
call_site[0] = main(0x100)
call_site[1] = x(0x150)
call_site[2] = y(0x200)
call_site[3] = garbage
call_site[4] = garbage
call_site[5] = a(0x200)
call_site[6] = d(0x400)
Thanks,
Jan
More information about the Gdb-patches
mailing list