From: Jamie Lokier <jamie@shareable.org>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: qemu-devel@nongnu.org, Anthony Liguori <aliguori@us.ibm.com>,
Paul Brook <paul@codesourcery.com>
Subject: Re: [Qemu-devel] Re: [PATCH 4/4] gdbstub: x86: Switch 64/32 bit registers dynamically
Date: Mon, 29 Jun 2009 23:00:45 +0100 [thread overview]
Message-ID: <20090629220044.GB7761@shareable.org> (raw)
In-Reply-To: <4A48DF6F.1090506@siemens.com>
Jan Kiszka wrote:
> Daniel Jacobowitz wrote:
> > On Mon, Jun 29, 2009 at 04:53:45PM +0200, Jan Kiszka wrote:
> >> Just to recall the situation (again, please actually try it): if you
> >> have to debug code that switches between 16/32 bit and 64 bit, you
> >> _can't_ debug the 16 or 32 bit part as gdb will stumble and fall over
> >> qemu sending 64-bit register layout for 16/32 bit code. That is a gdb
> >> limitation, but this patch is about dealing with it until it's resolved
> >> in gdb.
> >
> > Remind me why you can't just tell GDB that the target is 64-bit
> > despite whatever file you've given it?
>
> Because gdb mixes up arch capability and current operation mode on x86.
> It always tries to disassemble according to the set arch. Moreover, it
> will misinterpret the registers as being valid across all 64 bits, not
> just 16 or 32. I haven't looked into further side effects, but I bet
> there are more.
On a 64-bit CPU in 16/32-bit mode, all 64 register bits _are_ valid
aren't they? (But not useful, as far as I know. Unless there's a
64-bit equivalent to i386's "big real" modes and such).
-- Jamie
next prev parent reply other threads:[~2009-06-29 22:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-27 7:53 [Qemu-devel] [RESEND][PATCH 0/4] Long pending gdbstub patches Jan Kiszka
2009-06-27 7:53 ` [Qemu-devel] [PATCH 4/4] gdbstub: x86: Switch 64/32 bit registers dynamically Jan Kiszka
2009-06-29 13:01 ` [Qemu-devel] " Paul Brook
2009-06-29 13:42 ` Jan Kiszka
2009-06-29 14:07 ` Paul Brook
2009-06-29 14:22 ` Jan Kiszka
2009-06-29 14:43 ` Paul Brook
2009-06-29 14:53 ` Jan Kiszka
2009-06-29 15:16 ` Daniel Jacobowitz
2009-06-29 15:36 ` Jan Kiszka
2009-06-29 22:00 ` Jamie Lokier [this message]
2009-06-30 11:54 ` Jan Kiszka
2009-06-30 7:15 ` Gerd Hoffmann
2009-06-30 12:00 ` Jan Kiszka
2009-06-29 14:51 ` Paul Brook
2009-06-27 7:53 ` [Qemu-devel] [PATCH 1/4] gdbstub: Add vCont support Jan Kiszka
2009-06-27 7:53 ` [Qemu-devel] [PATCH 2/4] gdbstub: x86: Refactor register access Jan Kiszka
2009-06-27 7:53 ` [Qemu-devel] [PATCH 3/4] gdbstub: x86: Support for setting segment registers Jan Kiszka
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=20090629220044.GB7761@shareable.org \
--to=jamie@shareable.org \
--cc=aliguori@us.ibm.com \
--cc=jan.kiszka@siemens.com \
--cc=paul@codesourcery.com \
--cc=qemu-devel@nongnu.org \
/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 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).