qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gdb-xml: Fix size of EFER register on i386 architecture when debugged by GDB
@ 2022-09-13 12:06 TaiseiIto
  2022-10-10  2:46 ` [PATCH] [PING] " TaiseiIto
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: TaiseiIto @ 2022-09-13 12:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: alex.bennee, f4bug, TaiseiIto

Before this commit, there were contradictory descriptions about size of EFER
register.
Line 113 says the size is 8 bytes.
Line 129 says the size is 4 bytes.

As a result, when GDB is debugging an OS running on QEMU, the GDB cannot
read 'g' packets correctly. This 'g' packet transmits values of each
registers of machine emulated by QEMU to GDB. QEMU, the packet sender,
assign 4 bytes for EFER in 'g' packet based on the line 113.
GDB, the packet receiver, extract 8 bytes for EFER in 'g' packet based on
the line 129. Therefore, all registers located behind EFER in 'g' packet
has been shifted 4 bytes in GDB.

After this commit, GDB can read 'g' packets correctly.

Signed-off-by: TaiseiIto <taisei1212@outlook.jp>
---
 gdb-xml/i386-32bit.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb-xml/i386-32bit.xml b/gdb-xml/i386-32bit.xml
index 872fcea9c2..7a66a02b67 100644
--- a/gdb-xml/i386-32bit.xml
+++ b/gdb-xml/i386-32bit.xml
@@ -110,7 +110,7 @@
 	<field name="PKE" start="22" end="22"/>
   </flags>
 
-  <flags id="i386_efer" size="8">
+  <flags id="i386_efer" size="4">
 	<field name="TCE" start="15" end="15"/>
 	<field name="FFXSR" start="14" end="14"/>
 	<field name="LMSLE" start="13" end="13"/>
-- 
2.34.1



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

end of thread, other threads:[~2022-11-05  3:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-13 12:06 [PATCH] gdb-xml: Fix size of EFER register on i386 architecture when debugged by GDB TaiseiIto
2022-10-10  2:46 ` [PATCH] [PING] " TaiseiIto
2022-10-22  2:14   ` [PATCH] [PING^2] " TaiseiIto
2022-11-03 15:59 ` [PATCH] " Alex Bennée
2022-11-05  3:14   ` 伊藤 太清
2022-11-03 18:38 ` Paolo Bonzini

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