All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Neo Jia <neojia@gmail.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: qemu "info registers" doesn't match the one I saw from kgdb?
Date: Thu, 19 Feb 2009 10:39:58 +0100	[thread overview]
Message-ID: <499D28EE.6050309@siemens.com> (raw)
In-Reply-To: <5d649bdb0902190055n7e4098fek479f60158d61246e@mail.gmail.com>

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

      reply	other threads:[~2009-02-19  9:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=499D28EE.6050309@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    --cc=neojia@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.