Doubt using "set" command with registers
joaoandreferro@sapo.pt
joaoandreferro@sapo.pt
Tue Oct 28 16:02:00 GMT 2014
Hello all,
I've been using GDB (in fact, conjuged with KGDB) lately to do some
kernel debugging. I've been testing some GDB commands, and a doubt
arised while using the "set" command, trying to change the value of
some registers. I've been able to successfully change the value of all
the registers provided by the "info registers" command (i. e., in my
case $eax, $ecx, $edx, $ebx, $esp, $ebp, $esi, $edi, $eip, $eflags,
$cs, $ss, $ds, $es, $fs and $gs) *except* for $esp, $ss, $fs and $gs.
Why is it so? I've been making these tests after hitting a hardware
breakpoint, then I set the values with e. g. "set $es = 0xf1c2007c",
and verifiy the assignemt with "info reg $es". As I've pointed out, it
works with the majority of the registers, except for that four (in
this particular case, the first command doesn't output any error, but
the second command shows me that the registers remain with the initial
value). By the way, I've started GDB with the -write option (checked
it inside GDb with the "show write" command). My GDB version is 7.2.
If someone knows something about this situation and can share it with
me, it would be great.
Best regards,
João
More information about the Gdb
mailing list