This is the mail archive of the
mailing list for the GDB project.
Re: Unable to change the values of $ebp and $eip
- From: Daniel Jacobowitz <drow at false dot org>
- To: Kalpana Ramamurthy <kal_pana at hotmail dot com>
- Cc: gdb at sourceware dot org
- Date: Wed, 25 Apr 2007 07:22:23 -0400
- Subject: Re: Unable to change the values of $ebp and $eip
- References: <BAY144-F2999ECC052FEB747F9605FE8490@phx.gbl>
On Wed, Apr 25, 2007 at 09:39:06AM +0000, Kalpana Ramamurthy wrote:
> Why does this happen ? Why am I not able to set/change values of $ebp and $eip
> in the macro after I switch to a non-zero frame (older frame) ? The macro works
> great when I start execution of it from frame 0.
When you're in an earlier thread, "$eip" refers to that thread's
return address. Which in turn refers to a location on the stack where
it is saved. You're talking to a core file, so GDB can not write to
Honestly, I'm surprised that it works from frame 0 either. I would
have expected writing to "registers" to fail.