* qemu "info registers" doesn't match the one I saw from kgdb?
@ 2009-02-19 8:55 Neo Jia
2009-02-19 9:39 ` Jan Kiszka
0 siblings, 1 reply; 2+ messages in thread
From: Neo Jia @ 2009-02-19 8:55 UTC (permalink / raw)
To: kvm@vger.kernel.org
hi,
I am seeing something different between "info registers" from qemu
monitor window vs. kgdb. This is a 32-bit Linux guest running on
KVM-84.
When I just break into the guest kernel with kgdb, I tried the
follwoing commands:
(qemu) info registers
EAX=00010060 EBX=c0471e3c ECX=00000000 EDX=000002fd
ESI=000002fd EDI=c04c5d20 EBP=c0471ddc ESP=c0471ddc
EIP=c021129b EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =007b 00000000 ffffffff 00c0f300
CS =0060 00000000 ffffffff 00c09b00
SS =0068 00000000 ffffffff 00c09300
DS =007b 00000000 ffffffff 00c0f300
FS =0000 00000000 ffffffff 00000000
GS =0000 00000000 ffffffff 00000000
LDT=0000 00000000 ffffffff 00000000
TR =0000 00000000 0000ffff 00008b00
GDT= c0407a80 000000ff
IDT= c0464000 000007ff
CR0=80050033 CR2=00000000 CR3=004aa000 CR4=00000000
DR0=00000000 DR1=00000000 DR2=00000000 DR3=00000000
DR6=ffff0ff0 DR7=00000400
FCW=037f FSW=0000 [ST=0] FTW=00 MXCSR=00000000
FPR0=0000000000000000 0000 FPR1=0000000000000000 0000
FPR2=0000000000000000 0000 FPR3=0000000000000000 0000
FPR4=0000000000000000 0000 FPR5=0000000000000000 0000
FPR6=0000000000000000 0000 FPR7=0000000000000000 0000
XMM00=00000000000000000000000000000000 XMM01=00000000000000000000000000000000
XMM02=00000000000000000000000000000000 XMM03=00000000000000000000000000000000
XMM04=00000000000000000000000000000000 XMM05=00000000000000000000000000000000
XMM06=00000000000000000000000000000000 XMM07=00000000000000000000000000000000
But from Windbg, I got:
(gdb) info registers
eax 0x0 0x0
ecx 0xc 0xc
edx 0x0 0x0
ebx 0x0 0x0
esp 0xc0471f14 0xc0471f14
ebp 0xc0471fc0 0xc0471fc0
esi 0xc04ac07a 0xc04ac07a
edi 0xc04ad1f9 0xc04ad1f9
eip 0xc047a853 0xc047a853 <setup_arch+1036>
eflags 0x86 [ PF SF ]
cs 0x60 0x60
ss 0x68 0x68
ds 0xc049007b 0xc049007b
es 0x7b 0x7b
fs 0xffff 0xffff
gs 0xffff 0xffff
So, which one is correct? Do we still maintain the "info registers" on qemu?
Thanks,
Neo
--
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: qemu "info registers" doesn't match the one I saw from kgdb?
2009-02-19 8:55 qemu "info registers" doesn't match the one I saw from kgdb? Neo Jia
@ 2009-02-19 9:39 ` Jan Kiszka
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kiszka @ 2009-02-19 9:39 UTC (permalink / raw)
To: Neo Jia; +Cc: kvm@vger.kernel.org
Neo Jia wrote:
> hi,
>
> I am seeing something different between "info registers" from qemu
> monitor window vs. kgdb. This is a 32-bit Linux guest running on
> KVM-84.
>
> When I just break into the guest kernel with kgdb, I tried the
> follwoing commands:
>
> (qemu) info registers
> EAX=00010060 EBX=c0471e3c ECX=00000000 EDX=000002fd
> ESI=000002fd EDI=c04c5d20 EBP=c0471ddc ESP=c0471ddc
> EIP=c021129b EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0
> ES =007b 00000000 ffffffff 00c0f300
> CS =0060 00000000 ffffffff 00c09b00
> SS =0068 00000000 ffffffff 00c09300
> DS =007b 00000000 ffffffff 00c0f300
> FS =0000 00000000 ffffffff 00000000
> GS =0000 00000000 ffffffff 00000000
> LDT=0000 00000000 ffffffff 00000000
> TR =0000 00000000 0000ffff 00008b00
> GDT= c0407a80 000000ff
> IDT= c0464000 000007ff
> CR0=80050033 CR2=00000000 CR3=004aa000 CR4=00000000
> DR0=00000000 DR1=00000000 DR2=00000000 DR3=00000000
> DR6=ffff0ff0 DR7=00000400
> FCW=037f FSW=0000 [ST=0] FTW=00 MXCSR=00000000
> FPR0=0000000000000000 0000 FPR1=0000000000000000 0000
> FPR2=0000000000000000 0000 FPR3=0000000000000000 0000
> FPR4=0000000000000000 0000 FPR5=0000000000000000 0000
> FPR6=0000000000000000 0000 FPR7=0000000000000000 0000
> XMM00=00000000000000000000000000000000 XMM01=00000000000000000000000000000000
> XMM02=00000000000000000000000000000000 XMM03=00000000000000000000000000000000
> XMM04=00000000000000000000000000000000 XMM05=00000000000000000000000000000000
> XMM06=00000000000000000000000000000000 XMM07=00000000000000000000000000000000
>
> But from Windbg, I got:
>
> (gdb) info registers
> eax 0x0 0x0
> ecx 0xc 0xc
> edx 0x0 0x0
> ebx 0x0 0x0
> esp 0xc0471f14 0xc0471f14
> ebp 0xc0471fc0 0xc0471fc0
> esi 0xc04ac07a 0xc04ac07a
> edi 0xc04ad1f9 0xc04ad1f9
> eip 0xc047a853 0xc047a853 <setup_arch+1036>
> eflags 0x86 [ PF SF ]
> cs 0x60 0x60
> ss 0x68 0x68
> ds 0xc049007b 0xc049007b
> es 0x7b 0x7b
> fs 0xffff 0xffff
> gs 0xffff 0xffff
>
> So, which one is correct? Do we still maintain the "info registers" on qemu?
Yes, we do maintain them (for now only in the kvm tree, upstream is yet
lacking a few patches). But you have to keep in mind that, when you take
a snapshot of the guest running inside Windbg via "info registers" (or
via the built-in gdbstub), you actually debug Windbg itself, no longer
the guest kernel code Windbg is interrupting. That's why you see
different EIP values...
Jan
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-02-19 9:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-19 8:55 qemu "info registers" doesn't match the one I saw from kgdb? Neo Jia
2009-02-19 9:39 ` Jan Kiszka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox