fail to get ra and bp

bjgnu@sunnorth.com.cn bjgnu@sunnorth.com.cn
Thu Oct 12 04:33:00 GMT 2006


Hi all,

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.
Anyone has any thought?
 
Thanks.
ligang



More information about the Gdb mailing list