fail to get ra and bp

ligang@sunnorth.com.cn ligang@sunnorth.com.cn
Thu Oct 12 05:21:00 GMT 2006


Hi all,


I am porting GDB to a new target.

The prologue has two insns ---- push ra and push bp.
When back tracing and printing variables, gdb will look for return address 

of this frame and frame pointer on stack.
Unfortunately, If compiling with -O2, the two insns are probably deleted. 
So, GDB will not get ra and bp value.

It seems MIPS also fail to do this. 
Does it need to change ABI? Anyone has any thought?
 
Thanks.
Ligang



More information about the Gdb mailing list