Re: Doubt using "set" command with registers

[email protected]
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
Hello Pete,

I didn't use ekgdboe (I'm using a serial connection between the target  
and the host). The only option I used to debug during boot was the  
"kgdbwait" option (in the GRUB configuration file), to hang the target  
at boot, and wait for a "cont" command from the host. I removed this  
option some weeks ago though, because I do no want to do debug during  
boot. But I remember it worked.

Regarding the original thread's subject, do you know anything on why  
some register values can be changed while others can't?

Regards,
João

Citando Pete Delaney <[email protected]>:

> Had any luck using KGDB during the early boot code?
>
> I haven't been able to get the ekgdboe working with the keyboard via  
> a serial interface, thought it does start early enough.
> Can't get ekgdboe working with tty0/ttyS0; starts way to late to  
> debug a boot problem I'm looking at.
>
> This use to be trivial with the old SunOS 4.1.4 kgdb patch, and I  
> think the pre-KDB version of KGDB seemed
> To do early boot code ok. With old 2 page SunOS 4.1.4 patch  
> switching between task was just a matter of
> Getting the SP and PC from the proc  structure, changing $PS and $PC  
> in gdb and restarting GDB so it would
> Reload it's cache.
>
> JTAG based debugging shouldn't be necessary to debug early boot code
> And JTAG isn't readily available for large PCs.
>
> -piet
>
> --
> Pete/Piet Delaney
> O: +1 408 935-1813
> C: +1 408 646-8557
> H: +1 408 243-8872
> Home Email: [email protected]
>
>
>
>
> -----Original Message---though--
> From: [email protected] [mailto:[email protected]] On  
> Behalf Of [email protected]
> Sent: Tuesday, October 28, 2014 9:02 AM
> To: [email protected]
> Subject: Doubt using "set" command with registers
>
> 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.though
> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.