This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Frame lost after 'leave' and before 'ret' instruction on i386?
- From: Daniel Jacobowitz <drow at false dot org>
- To: Aleksandar Ristovski <aristovski at qnx dot com>
- Cc: gdb at sourceware dot org
- Date: Fri, 16 May 2008 11:58:28 -0400
- Subject: Re: Frame lost after 'leave' and before 'ret' instruction on i386?
- References: <482DA814.7030703@qnx.com>
On Fri, May 16, 2008 at 11:28:20AM -0400, Aleksandar Ristovski wrote:
> What happens is, we have restored the stack pointer but gdb is unaware of that fact and tries to unwind using already unwound value...
>
> how is this supposed to work?
Poorly.
The biggest problem, in my opinion, is that GCC emits bogus unwind
info that does not describe epilogues. I don't know about other
compilers. So far no one has fixed this in a way that didn't bloat
debug info to an unacceptable size.
When DWARF unwinding is not in use, there's the in_epilogue_p hook.
Prologue analyzers could also detect epilogues using the same
technique. But this is slow and complicated.
--
Daniel Jacobowitz
CodeSourcery