From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LbKP3-0001qP-Vc for qemu-devel@nongnu.org; Sun, 22 Feb 2009 14:54:17 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LbKP3-0001pI-1X for qemu-devel@nongnu.org; Sun, 22 Feb 2009 14:54:17 -0500 Received: from [199.232.76.173] (port=35644 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LbKP2-0001pE-Sp for qemu-devel@nongnu.org; Sun, 22 Feb 2009 14:54:16 -0500 Received: from sd-1780.dedibox.fr ([88.191.14.212]:46465) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LbKP2-0005YT-E5 for qemu-devel@nongnu.org; Sun, 22 Feb 2009 14:54:16 -0500 Date: Sun, 22 Feb 2009 20:54:12 +0100 From: Pierre-Alexandre Meyer Message-ID: <20090222195411.GO28647@panda> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Subject: [Qemu-devel] Dump registers? Reply-To: pierre@mouraf.org, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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