qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] x86_64 debugging while in 32-bit mode
@ 2011-02-25 20:54 vagran
  2011-02-26 14:17 ` [Qemu-devel] " vagran
  0 siblings, 1 reply; 2+ messages in thread
From: vagran @ 2011-02-25 20:54 UTC (permalink / raw)
  To: qemu-devel

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Qemu-devel] Re: x86_64 debugging while in 32-bit mode
  2011-02-25 20:54 [Qemu-devel] x86_64 debugging while in 32-bit mode vagran
@ 2011-02-26 14:17 ` vagran
  0 siblings, 0 replies; 2+ messages in thread
From: vagran @ 2011-02-26 14:17 UTC (permalink / raw)
  To: qemu-devel


> 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.
Hi,
Seems the problem is not present on the latest version of the Qemu. I 
had several
installed and occasionally launched old one. Sorry for inconvenience.

Best regards,
Artyom.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-26 14:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-25 20:54 [Qemu-devel] x86_64 debugging while in 32-bit mode vagran
2011-02-26 14:17 ` [Qemu-devel] " vagran

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).