This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Modifying a verboten register
On 5/4/06, Daniel Jacobowitz <drow@false.org> wrote:
...
I posted an explanation of this problem on gdb-patches yesterday, as it
happens, with a nasty hack.
Wonderful news! Thanks, Daniel.
Right here, use the flushregs command in GDB.
Great! Thanks for pointing this command out to me. I've used this hack
to modify the $cpsr and $pc to set the core back to a good frame. GDB
still has its old frame in its cache though. Is there a command to
re-read the frame from the new register values?
(gdb) f
#0 0x00000010 in ?? ()
BDI>rm cpsr 0xff
BDI>rm pc 0x200ca9a
(gdb) flushregs
Register cache flushed.
(gdb) p/x $cpsr
$24 = 0xff
(gdb) x/i $pc
0x200ca9a <_vfprintf_r+250>: ldrb r2, [r7, #0]
(gdb) f
#0 0x00000010 in ?? ()
Thanks,
Shaun