This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [patch, rfc, 6.0] Change frame predicates to sniffers
- From: Michael Elizabeth Chastain <mec at shout dot net>
- To: kettenis at chello dot nl
- Cc: ac131313 at redhat dot com, gdb-patches at sources dot redhat dot com
- Date: Mon, 14 Jul 2003 01:34:58 -0400
- Subject: Re: [patch, rfc, 6.0] Change frame predicates to sniffers
Mark Kettenis writes:
> For your testcases, the instructions after the function call are
> optimized away. This means that the return address of the called
> frame points to the first instruction of the next function. The
> prologue analysis is done for this function instead of the function
> that actually made the call.
Gotcha.
> The new prologue analyzer notices that at the first instruction of a
> function, the frame-pointer hasn't been setup yet, and the frame
> unwinder uses the stack-pointer for unwinding. This fails because we
> haven't actually called the function we're analyzing.
Aha!
This is consistent with the stack dump I attached to pr gdb/1250.
gdb picks out a word for the program counter that would be correct
if the caller looked like this:
func2:
call abort
push %ebp
mov %ebp, %esp
This is a good candidate for a standalone test, gdb.base/gdb1250.exp,
with a KFAIL in it. I'll write such a test tomorrow.
Michael C