This is the mail archive of the
ecos-discuss@sourceware.cygnus.com
mailing list for the eCos project.
Re: GDB's stack trace.
- To: "Patrick O'Grady" <patrick at softprocess dot com>
- Subject: Re: [ECOS] GDB's stack trace.
- From: Bob Koninckx <bob dot koninckx at mech dot kuleuven dot ac dot be>
- Date: Fri, 21 Jan 2000 10:20:25 +0100
- CC: ecos-discuss at sourceware dot cygnus dot com
- Organization: KULeuven
- References: <Pine.BSF.4.10.10001201759330.24644-100000@plasticgrape.com>
- Reply-To: bob dot koninckx at mech dot kuleuven dot ac dot be
Patrick O'Grady wrote:
>
> Hi, all--
>
> Does anyone out there know what tells GDB that it's at the top of the
> stack during a back-trace? Whenever I 'bt' a stopped thread, I get
> legtimate stack data followed by a bunch of junk... somehow GDB gets told
> when the stack ends--anyone know how this is done? Thanks in advance..
>
> -patrick
> patrick@softprocess.com
If I am not mistaking, GDB decides that it reached the top of the stack
as soon as it sees a "terminating stack record", that is, a stack record
that has no valid (0x0000000) backchain and return address anymore.
Are you sure that the stack is correctly initialised before entering the
new thread ?? I suppose that a terminating stack record must be present
before the call to the thread entry point. This way, the entry will be
seen as the last call on that stack.
Hope this helps,
Bob
--
-----------------------------------------------------------------------
ir. Bob Koninckx
Katholieke Universiteit Leuven
Division Production Engineering, tel. +32 16 322535
Machine Design and Automation fax. +32 16 322987
Celestijnenlaan 300B bob.koninckx@mech.kuleuven.ac.be
B-3001 Leuven Belgium
http://www.mech.kuleuven.ac.be/pma.html
-----------------------------------------------------------------------