This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix wrong assertions
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: Andreas Schwab <schwab at linux-m68k dot org>, gdb-patches at sourceware dot org
- Date: Sat, 30 May 2015 09:44:08 +0200
- 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> <86y4k7ny2q dot fsf at gmail dot com>
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