From b8158192fadb3e346372456c25cbbc4be584a85c Mon Sep 17 00:00:00 2001 From: Abdallah Bouassida Date: Thu, 1 Jun 2017 11:33:15 +0200 Subject: [PATCH] target/i386: 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. Signed-off-by: Abdallah Bouassida Signed-off-by: Paolo Bonzini --- 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 diff --git a/configure b/configure index 13e040d28c..71f5612a65 100755 --- a/configure +++ b/configure @@ -6027,11 +6027,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" diff --git a/gdb-xml/i386-32bit-sse.xml b/gdb-xml/i386-32bit-sse.xml new file mode 100644 index 0000000000..57678473d6 --- /dev/null +++ b/gdb-xml/i386-32bit-sse.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gdb-xml/i386-32bit.xml b/gdb-xml/i386-32bit.xml new file mode 100644 index 0000000000..956fc7f45f --- /dev/null +++ b/gdb-xml/i386-32bit.xml @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/gdb-xml/i386-64bit-sse.xml b/gdb-xml/i386-64bit-sse.xml new file mode 100644 index 0000000000..e86efc9ce5 --- /dev/null +++ b/gdb-xml/i386-64bit-sse.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gdb-xml/i386-64bit.xml b/gdb-xml/i386-64bit.xml new file mode 100644 index 0000000000..0b2f00ccbe --- /dev/null +++ b/gdb-xml/i386-64bit.xml @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 3f832a6a94..b2b1d20cee 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -4068,11 +4068,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; -- 2.39.2