target-x86: Add GDB XML description for SSE registers
PATCH 1/1 target-x86: Add GDB XML description for SSE registers
[Qemu-devel] [PATCH] target-x86: Add GDB XML description for SSE registers
Add an XML description for SSE registers (XMM+MXCSR) for both X86 and X86-64 architectures in the GDB stub:
- configure: Define gdb_xml_files for the X86 targets (32 and 64bit).
- gdb-xml/i386-32bit-sse.xml & gdb-xml/i386-64bit-sse.xml: The XML files that contain a description of the XMM + MXCSR registers.
- gdb-xml/i386-32bit.xml & gdb-xml/i386-64bit.xml: wrappers that include the XML file of the core registers and the other XML file of the SSE registers.
- target/i386/cpu.c: Modify the gdb_core_xml_file to the new XML wrapper, modify the gdb_num_core_regs to fit the registers number defined in each XML file.
---
@Paolo: This patch is in response to your hints here:
https://lists.gnu.org/archive/html/qemu-devel/2017-03/msg03314.html
Thank you for pointing me on the missing registers!
configure | 4 ++-- gdb-xml/i386-32bit-sse.xml | 52 ++++++++++++++++++++++++++++++++++++++++ gdb-xml/i386-32bit.xml | 14 +++++++++++ gdb-xml/i386-64bit-sse.xml | 60 ++++++++++++++++++++++++++++++++++++++++++++++ gdb-xml/i386-64bit.xml | 14 +++++++++++ target/i386/cpu.c | 8 +++---- 6 files changed, 146 insertions(+), 6 deletions(-) create mode 100644 gdb-xml/i386-32bit-sse.xml create mode 100644 gdb-xml/i386-32bit.xml create mode 100644 gdb-xml/i386-64bit-sse.xml create mode 100644 gdb-xml/i386-64bit.xml
configure +2 -2
@@ -6044,11 +6044,11 @@ TARGET_ABI_DIR="" case "$target_name" in i386) - gdb_xml_files="i386-32bit-core.xml" + gdb_xml_files="i386-32bit.xml i386-32bit-core.xml i386-32bit-sse.xml" ;; x86_64) TARGET_BASE_ARCH=i386 - gdb_xml_files="i386-64bit-core.xml" + gdb_xml_files="i386-64bit.xml i386-64bit-core.xml i386-64bit-sse.xml" ;; alpha) mttcg="yes"
gdb-xml/i386-32bit-sse.xml new file +52 -0
52 lines not on this page · raw message
gdb-xml/i386-32bit.xml new file +14 -0
@@ -0,0 +1,14 @@ +<?xml version="1.0"?> +<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc. + + Copying and distribution of this file, with or without modification, + are permitted in any medium without royalty provided the copyright + notice and this notice are preserved. --> + +<!-- I386 with SSE --> + +<!DOCTYPE target SYSTEM "gdb-target.dtd"> +<feature name="org.gnu.gdb.i386.32bit"> + <xi:include href="i386-32bit-core.xml"/> + <xi:include href="i386-32bit-sse.xml"/> +</feature>
gdb-xml/i386-64bit-sse.xml new file +60 -0
60 lines not on this page · raw message
gdb-xml/i386-64bit.xml new file +14 -0
@@ -0,0 +1,14 @@ +<?xml version="1.0"?> +<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc. + + Copying and distribution of this file, with or without modification, + are permitted in any medium without royalty provided the copyright + notice and this notice are preserved. --> + +<!-- I386 64bit --> + +<!DOCTYPE target SYSTEM "gdb-target.dtd"> +<feature name="org.gnu.gdb.i386.64bit"> + <xi:include href="i386-64bit-core.xml"/> + <xi:include href="i386-64bit-sse.xml"/> +</feature>
target/i386/cpu.c +4 -4
@@ -4063,11 +4063,11 @@ static void x86_cpu_common_class_init(ObjectClass *oc, void *data)#endif cc->gdb_arch_name = x86_gdb_arch_name;#ifdef TARGET_X86_64 - cc->gdb_core_xml_file ="i386-64bit-core.xml" ; - cc->gdb_num_core_regs =40 ; + cc->gdb_core_xml_file ="i386-64bit.xml" ; + cc->gdb_num_core_regs =57 ;#else - cc->gdb_core_xml_file ="i386-32bit-core.xml" ; - cc->gdb_num_core_regs =32 ; + cc->gdb_core_xml_file ="i386-32bit.xml" ; + cc->gdb_num_core_regs =41 ;#endif #ifndef CONFIG_USER_ONLY cc->debug_excp_handler = breakpoint_handler;
Signature · 1 line
1.9.1
Quoted 14 lines · Abdallah Bouassida
[Qemu-devel] [PATCH] target-x86: Add GDB XML description for SSE registers
Add an XML description for SSE registers (XMM+MXCSR) for both X86 and X86-64 architectures in the GDB stub:
- configure: Definegdb_xml_filesfor the X86 targets (32 and 64bit).
-gdb-xml/i386-32bit-sse.xml&gdb-xml/i386-64bit-sse.xml: The XML files that contain a description of the XMM + MXCSR registers.
-gdb-xml/i386-32bit.xml&gdb-xml/i386-64bit.xml: wrappers that include the XML file of the core registers and the other XML file of the SSE registers.
-target/i386/cpu.c: Modify thegdb_core_xml_fileto the new XML wrapper, modify thegdb_num_core_regsto fit the registers number defined in each XML file.
Quoted 5 lines
Signed-off-by Abdallah Bouassida <[email protected]>---
@Paolo: This patch is in response to your hints here:
https://lists.gnu.org/archive/html/qemu-devel/2017-03/msg03314.html
Thank you for pointing me on the missing registers!
Thanks, looks good!
Paolo
Quoted 219 lines
configure | 4 ++-- gdb-xml/i386-32bit-sse.xml | 52 ++++++++++++++++++++++++++++++++++++++++ gdb-xml/i386-32bit.xml | 14 +++++++++++ gdb-xml/i386-64bit-sse.xml | 60 ++++++++++++++++++++++++++++++++++++++++++++++ gdb-xml/i386-64bit.xml | 14 +++++++++++ target/i386/cpu.c | 8 +++---- 6 files changed, 146 insertions(+), 6 deletions(-) create mode 100644 gdb-xml/i386-32bit-sse.xml create mode 100644 gdb-xml/i386-32bit.xml create mode 100644 gdb-xml/i386-64bit-sse.xml create mode 100644 gdb-xml/i386-64bit.xmlconfigure +2
-2@@ -6044,11 +6044,11 @@ TARGET_ABI_DIR="" case "$target_name" in i386) - gdb_xml_files="i386-32bit-core.xml" + gdb_xml_files="i386-32bit.xml i386-32bit-core.xml i386-32bit-sse.xml" ;; x86_64) TARGET_BASE_ARCH=i386 - gdb_xml_files="i386-64bit-core.xml" + gdb_xml_files="i386-64bit.xml i386-64bit-core.xml i386-64bit-sse.xml" ;; alpha) mttcg="yes"gdb-xml/i386-32bit-sse.xml new file +52
-0@@ -0,0 +1,52 @@ +<?xml version="1.0"?> +<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc. + + Copying and distribution of this file, with or without modification, + are permitted in any medium without royalty provided the copyright + notice and this notice are preserved. --> + +<!DOCTYPE feature SYSTEM "gdb-target.dtd"> +<feature name="org.gnu.gdb.i386.32bit.sse"> + <vector id="v4f" type="ieee_single" count="4"/> + <vector id="v2d" type="ieee_double" count="2"/> + <vector id="v16i8" type="int8" count="16"/> + <vector id="v8i16" type="int16" count="8"/> + <vector id="v4i32" type="int32" count="4"/> + <vector id="v2i64" type="int64" count="2"/> + <union id="vec128"> + <field name="v4_float" type="v4f"/> + <field name="v2_double" type="v2d"/> + <field name="v16_int8" type="v16i8"/> + <field name="v8_int16" type="v8i16"/> + <field name="v4_int32" type="v4i32"/> + <field name="v2_int64" type="v2i64"/> + <field name="uint128" type="uint128"/> + </union> + <flags id="i386_mxcsr" size="4"> + <field name="IE" start="0" end="0"/> + <field name="DE" start="1" end="1"/> + <field name="ZE" start="2" end="2"/> + <field name="OE" start="3" end="3"/> + <field name="UE" start="4" end="4"/> + <field name="PE" start="5" end="5"/> + <field name="DAZ" start="6" end="6"/> + <field name="IM" start="7" end="7"/> + <field name="DM" start="8" end="8"/> + <field name="ZM" start="9" end="9"/> + <field name="OM" start="10" end="10"/> + <field name="UM" start="11" end="11"/> + <field name="PM" start="12" end="12"/> + <field name="FZ" start="15" end="15"/> + </flags> + + <reg name="xmm0" bitsize="128" type="vec128" regnum="32"/> + <reg name="xmm1" bitsize="128" type="vec128"/> + <reg name="xmm2" bitsize="128" type="vec128"/> + <reg name="xmm3" bitsize="128" type="vec128"/> + <reg name="xmm4" bitsize="128" type="vec128"/> + <reg name="xmm5" bitsize="128" type="vec128"/> + <reg name="xmm6" bitsize="128" type="vec128"/> + <reg name="xmm7" bitsize="128" type="vec128"/> + + <reg name="mxcsr" bitsize="32" type="i386_mxcsr" group="vector"/> +</feature>gdb-xml/i386-32bit.xml new file +14
-0@@ -0,0 +1,14 @@ +<?xml version="1.0"?> +<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc. + + Copying and distribution of this file, with or without modification, + are permitted in any medium without royalty provided the copyright + notice and this notice are preserved. --> + +<!-- I386 with SSE --> + +<!DOCTYPE target SYSTEM "gdb-target.dtd"> +<feature name="org.gnu.gdb.i386.32bit"> + <xi:include href="i386-32bit-core.xml"/> + <xi:include href="i386-32bit-sse.xml"/> +</feature>gdb-xml/i386-64bit-sse.xml new file +60
-0@@ -0,0 +1,60 @@ +<?xml version="1.0"?> +<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc. + + Copying and distribution of this file, with or without modification, + are permitted in any medium without royalty provided the copyright + notice and this notice are preserved. --> + +<!DOCTYPE feature SYSTEM "gdb-target.dtd"> +<feature name="org.gnu.gdb.i386.64bit.sse"> + <vector id="v4f" type="ieee_single" count="4"/> + <vector id="v2d" type="ieee_double" count="2"/> + <vector id="v16i8" type="int8" count="16"/> + <vector id="v8i16" type="int16" count="8"/> + <vector id="v4i32" type="int32" count="4"/> + <vector id="v2i64" type="int64" count="2"/> + <union id="vec128"> + <field name="v4_float" type="v4f"/> + <field name="v2_double" type="v2d"/> + <field name="v16_int8" type="v16i8"/> + <field name="v8_int16" type="v8i16"/> + <field name="v4_int32" type="v4i32"/> + <field name="v2_int64" type="v2i64"/> + <field name="uint128" type="uint128"/> + </union> + <flags id="i386_mxcsr" size="4"> + <field name="IE" start="0" end="0"/> + <field name="DE" start="1" end="1"/> + <field name="ZE" start="2" end="2"/> + <field name="OE" start="3" end="3"/> + <field name="UE" start="4" end="4"/> + <field name="PE" start="5" end="5"/> + <field name="DAZ" start="6" end="6"/> + <field name="IM" start="7" end="7"/> + <field name="DM" start="8" end="8"/> + <field name="ZM" start="9" end="9"/> + <field name="OM" start="10" end="10"/> + <field name="UM" start="11" end="11"/> + <field name="PM" start="12" end="12"/> + <field name="FZ" start="15" end="15"/> + </flags> + + <reg name="xmm0" bitsize="128" type="vec128" regnum="40"/> + <reg name="xmm1" bitsize="128" type="vec128"/> + <reg name="xmm2" bitsize="128" type="vec128"/> + <reg name="xmm3" bitsize="128" type="vec128"/> + <reg name="xmm4" bitsize="128" type="vec128"/> + <reg name="xmm5" bitsize="128" type="vec128"/> + <reg name="xmm6" bitsize="128" type="vec128"/> + <reg name="xmm7" bitsize="128" type="vec128"/> + <reg name="xmm8" bitsize="128" type="vec128"/> + <reg name="xmm9" bitsize="128" type="vec128"/> + <reg name="xmm10" bitsize="128" type="vec128"/> + <reg name="xmm11" bitsize="128" type="vec128"/> + <reg name="xmm12" bitsize="128" type="vec128"/> + <reg name="xmm13" bitsize="128" type="vec128"/> + <reg name="xmm14" bitsize="128" type="vec128"/> + <reg name="xmm15" bitsize="128" type="vec128"/> + + <reg name="mxcsr" bitsize="32" type="i386_mxcsr" group="vector"/> +</feature>gdb-xml/i386-64bit.xml new file +14
-0@@ -0,0 +1,14 @@ +<?xml version="1.0"?> +<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc. + + Copying and distribution of this file, with or without modification, + are permitted in any medium without royalty provided the copyright + notice and this notice are preserved. --> + +<!-- I386 64bit --> + +<!DOCTYPE target SYSTEM "gdb-target.dtd"> +<feature name="org.gnu.gdb.i386.64bit"> + <xi:include href="i386-64bit-core.xml"/> + <xi:include href="i386-64bit-sse.xml"/> +</feature>target/i386/cpu.c +4
-4@@ -4063,11 +4063,11 @@ static void x86_cpu_common_class_init(ObjectClass *oc, void *data)#endif cc->gdb_arch_name = x86_gdb_arch_name;#ifdef TARGET_X86_64 - cc->gdb_core_xml_file ="i386-64bit-core.xml" ; - cc->gdb_num_core_regs =40 ; + cc->gdb_core_xml_file ="i386-64bit.xml" ; + cc->gdb_num_core_regs =57 ;#else - cc->gdb_core_xml_file ="i386-32bit-core.xml" ; - cc->gdb_num_core_regs =32 ; + cc->gdb_core_xml_file ="i386-32bit.xml" ; + cc->gdb_num_core_regs =41 ;#endif #ifndef CONFIG_USER_ONLY cc->debug_excp_handler = breakpoint_handler;Signature · 1 line
1.9.1