Backtrace of naked functions

Marius Groeger mgroeger@sysgo.com
Mon Sep 26 12:56:00 GMT 2005


On Mon, 26 Sep 2005, Duane Ellis wrote:

> The problem is most likely in *your* startup code that calls *your*
> entry point.

I know what you mean, and believe me, I did try hard to come up with a 
terminated stack frame. I tried every even remotely reasonable 
combination of pointers and backlinks, to no avail. That said, I 
certainly don't claim to know all tricks and treats. Fact is, trying 
to understand GDB's logic on this is a complete nightmare. :-)

Again, the issue came up on PPC and X86. For PPC, I could not find 
some kind of "official" statement as to how to terminate a stack 
frame. One should expect this in the EABI, but it's not there.

For the X86, this is even more tricky since the stack frame is only 
half-initialised by the caller, the other half is done by the callee. 
So there is virtually now way to get this straigt in case you want the 
debugger tap into your programm at the very _first_ instruction of a 
function.

Regards,
Marius

-- 
Marius Groeger <mgroeger@sysgo.com>
SYSGO AG                      Embedded and Real-Time Software
Voice: +49 6136 9948 0                  FAX: +49 6136 9948 10
www.sysgo.com | www.elinos.com | www.osek.de | www.pikeos.com


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list