Setting registers

Paul Koning pkoning@equallogic.com
Fri Jun 15 15:24:00 GMT 2007


>>>>> "Daniel" == Daniel Jacobowitz <drow@false.org> writes:

 Daniel> On Fri, Jun 15, 2007 at 10:41:38AM -0400, Paul Koning wrote:
 >> Sometimes it would be useful to be able to.  If the stack is
 >> corrupt, or the return address (for processor types that have such
 >> a thing) and you can figure out the correct values, it would be
 >> very handy to be able to tell gdb "here is the right value" and
 >> let it use that for subsequent analysis.

 Daniel> We do get requests for this so frequently that I'm tempted to
 Daniel> allow modifiable registers... memory, though, would be hard.

Not really, you'd just have to allow writing to the corefile.  I think
you'd want to disable that by default -- otherwise a slip of the
finger would mess up your carefully collected data.  But after an
explicit enable it could be done.

And it's necessary if you're trying to change a register for an inner
frame. 

       paul



More information about the Gdb mailing list