* [Qemu-devel] Dump registers?
@ 2009-02-22 19:54 Pierre-Alexandre Meyer
2009-02-23 6:46 ` malc
0 siblings, 1 reply; 3+ messages in thread
From: Pierre-Alexandre Meyer @ 2009-02-22 19:54 UTC (permalink / raw)
To: qemu-devel
Good morning,
I am developing an application at the bootloader level that
eventually jumps into protected mode. My testing is done using the
qemu Ubuntu Intrepid build (0.9.1).
Doing something like
qemu -M pc -hda foo.vmdk -m 1000 -no-kqemu -boot c -S -s
and connecting gdb works great... until the application jumps into
protected mode when gdb becomes really confused.
Setting a break point at the first function after protected mode doesn't
work.
With no break points, if I SIGINT the program after the jump, gdb is confused:
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
This makes sense I suppose since the segment registers were changed
since gdb was started. I have then access to the registers but I am not sure
how accurate they are.
Is there a way to ask qemu to dump these registers (as well as the
descriptor tables)? I saw once a dump like:
qemu: fatal: triple fault
EAX=6000004d EBX=00000914 ECX=00000000 EDX=000028a3
ESI=00000000 EDI=00005443 EBP=00000028 ESP=00007c48
EIP=00002800 EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0010 00000000 ffffffff 008f9300
CS =0008 00000000 0000ffff 00009b00
SS =0038 00000000 0000ffff 00009300
DS =0010 00000000 ffffffff 008f9300
FS =0018 00000000 0000ffff 00009300
GS =0018 00000000 0000ffff 00009300
LDT=0000 00000000 00000000 00008000
TR =0030 0000285c 00000067 00008900
GDT= 000028c4 0000003f
IDT= 00000000 0000ffff
CR0=60000011 CR2=00000000 CR3=00000000 CR4=00000000
CCS=6000004d CCD=600000d0 CCO=ADDB
FCW=037f FSW=0000 [ST=0] FTW=00 MXCSR=00001f80
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
This is exactly what I am looking for. Any idea if I can force such a
dump on demand and/or fix gdb?
Thank you.
(Please CC: me when replying, since I am not on the list)
--
Pierre-Alexandre Meyer
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] Dump registers?
2009-02-22 19:54 [Qemu-devel] Dump registers? Pierre-Alexandre Meyer
@ 2009-02-23 6:46 ` malc
2009-02-24 4:16 ` Pierre-Alexandre Meyer
0 siblings, 1 reply; 3+ messages in thread
From: malc @ 2009-02-23 6:46 UTC (permalink / raw)
To: pierre, qemu-devel
On Sun, 22 Feb 2009, Pierre-Alexandre Meyer wrote:
> Good morning,
>
> I am developing an application at the bootloader level that
> eventually jumps into protected mode. My testing is done using the
> qemu Ubuntu Intrepid build (0.9.1).
>
> Doing something like
>
> qemu -M pc -hda foo.vmdk -m 1000 -no-kqemu -boot c -S -s
>
> and connecting gdb works great... until the application jumps into
> protected mode when gdb becomes really confused.
>
> Setting a break point at the first function after protected mode doesn't
> work.
>
> With no break points, if I SIGINT the program after the jump, gdb is confused:
>
> Backtrace stopped: previous frame inner to this frame (corrupt stack?)
>
> This makes sense I suppose since the segment registers were changed
> since gdb was started. I have then access to the registers but I am not sure
> how accurate they are.
>
> Is there a way to ask qemu to dump these registers (as well as the
> descriptor tables)? I saw once a dump like:
>
Switch to QEMU monitor and type `info registers'.
[..snip..]
>
> This is exactly what I am looking for. Any idea if I can force such a
> dump on demand and/or fix gdb?
>
> Thank you.
>
> (Please CC: me when replying, since I am not on the list)
>
>
--
mailto:av1474@comtv.ru
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] Dump registers?
2009-02-23 6:46 ` malc
@ 2009-02-24 4:16 ` Pierre-Alexandre Meyer
0 siblings, 0 replies; 3+ messages in thread
From: Pierre-Alexandre Meyer @ 2009-02-24 4:16 UTC (permalink / raw)
To: malc; +Cc: qemu-devel
On Monday 23 February 2009 à 09:46:19AM, malc wrote:
> Switch to QEMU monitor and type `info registers'.
Works perfectly.
Thanks, I wasn't aware of that feature.
--
Pierre-Alexandre Meyer
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-02-24 4:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-22 19:54 [Qemu-devel] Dump registers? Pierre-Alexandre Meyer
2009-02-23 6:46 ` malc
2009-02-24 4:16 ` Pierre-Alexandre Meyer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).