qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: vagran <vagran.ast@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] x86_64 debugging while in 32-bit mode
Date: Fri, 25 Feb 2011 22:54:29 +0200	[thread overview]
Message-ID: <4D681705.9090100@gmail.com> (raw)

Hi,
I have a problem with debugging 64-bit emulation using Qemu GDB stub. The
problem is that Qemu always sends x86_64 registers set disregarding current
actual mode of an emulated CPU. It results in error message in GDB - 
"Remote 'g'
packet reply is too long: ...". Yes, I understand that in case I will 
execute
"set architecture i386:x86-64:intel" command it will show me correct 
registers
content. But the problem is that in such case it will incorrectly try to
disassemble the code and unwind the stack - it will interpret it as 
64-bit while
it is actually 32-bit. In my understanding Qemu should dynamically 
change the
format of "g" and "G" packets depending on current CPU mode. On the 
other end,
user could change manually GDB current architecture by corresponding "set
architecture" command.
Please correct me, if I am not right. May be there is some existing 
methodology
of debugging Qemu emulated x86_64 architecture in different CPU modes. 
For now,
I have strong intention to make a patch for Qemu GDB stub, at least for 
me. But
I have impression that this should be corrected in official release too.

-- 
Best regards,
Artyom.

             reply	other threads:[~2011-02-25 20:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-25 20:54 vagran [this message]
2011-02-26 14:17 ` [Qemu-devel] Re: x86_64 debugging while in 32-bit mode vagran

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=4D681705.9090100@gmail.com \
    --to=vagran.ast@gmail.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).