This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Unable to change the values of $ebp and $eip


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
memory.

Honestly, I'm surprised that it works from frame 0 either.  I would
have expected writing to "registers" to fail.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]