Re: Doubt using "set" command with registers
Pedro Alves <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi João, On 10/28/2014 04:01 PM, [email protected] wrote: > 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. I'd guess that it's kgdb itself that is blocking those writes. Try "set debug remote 1" before the "set $foo = " command. Thanks, Pedro Alves