Skip to contentSkip to conversation

target/mips: add gdb xml files

PATCH In review Mikhail Abakumov 3 participants 5 messages Oct 7, 2019 – Oct 9, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target/mips: add gdb xml files

From: Mikhail Abakumov <mikhail.abakumov@ispras>

This patch add xml files with gdb registers for mips.

---
 configure               |  3 ++
 gdb-xml/mips-core.xml   | 84 +++++++++++++++++++++++++++++++++++++++++
 gdb-xml/mips64-core.xml | 84 +++++++++++++++++++++++++++++++++++++++++
 target/mips/cpu.c       | 11 ++++++
 4 files changed, 182 insertions(+)
 create mode 100644 gdb-xml/mips-core.xml
 create mode 100644 gdb-xml/mips64-core.xml
configure +3 -0
index 8f8446f52b..5bb2c62194 100755
@@ -7466,12 +7466,14 @@ case "$target_name" in
   mips|mipsel)
     mttcg="yes"
     TARGET_ARCH=mips
+    gdb_xml_files="mips-core.xml"
     echo "TARGET_ABI_MIPSO32=y" >> $config_target_mak
   ;;
   mipsn32|mipsn32el)
     mttcg="yes"
     TARGET_ARCH=mips64
     TARGET_BASE_ARCH=mips
+    gdb_xml_files="mips64-core.xml"
     echo "TARGET_ABI_MIPSN32=y" >> $config_target_mak
     echo "TARGET_ABI32=y" >> $config_target_mak
   ;;
@@ -7479,6 +7481,7 @@ case "$target_name" in
     mttcg="yes"
     TARGET_ARCH=mips64
     TARGET_BASE_ARCH=mips
+    gdb_xml_files="mips64-core.xml"
     echo "TARGET_ABI_MIPSN64=y" >> $config_target_mak
   ;;
   moxie)
gdb-xml/mips-core.xml new file +84 -0

84 lines not on this page · raw message

gdb-xml/mips64-core.xml new file +84 -0

84 lines not on this page · raw message

target/mips/cpu.c +11 -0
index bbcf7ca463..014f1db59e 100644
@@ -181,6 +181,11 @@ static ObjectClass *mips_cpu_class_by_name(const char *cpu_model)
     return oc;
 }
 
+static gchar *mips_gdb_arch_name(CPUState *cs)
+{
+    return g_strdup("mips");
+}
+
 static void mips_cpu_class_init(ObjectClass *c, void *data)
 {
     MIPSCPUClass *mcc = MIPS_CPU_CLASS(c);
@@ -213,6 +218,12 @@ static void mips_cpu_class_init(ObjectClass *c, void *data)
     cc->tlb_fill = mips_cpu_tlb_fill;
 #endif
 
+    cc->gdb_arch_name = mips_gdb_arch_name;
+#ifdef TARGET_MIPS64
+    cc->gdb_core_xml_file = "mips64-core.xml";
+#else
+    cc->gdb_core_xml_file = "mips-core.xml";
+#endif
     cc->gdb_num_core_regs = 73;
     cc->gdb_stop_before_watchpoint = true;
 }
Signature · 1 line
2.17.1
Acked-by on v1 1/1
#1 lore raw
Quoted 1 line · Mikhail Abakumov

From: Mikhail Abakumov <mikhail.abakumov@ispras>

Hmm the email got truncated here.

Quoted 9 lines

This patch add xml files with gdb registers for mips.

---
 configure               |  3 ++
 gdb-xml/mips-core.xml   | 84 +++++++++++++++++++++++++++++++++++++++++
 gdb-xml/mips64-core.xml | 84

+++++++++++++++++++++++++++++++++++++++++

Otherwise for the configure/xml:

I assume the changes will go in via a MIPS tree.

Quoted 244 lines
 target/mips/cpu.c       | 11 ++++++
 4 files changed, 182 insertions(+)
 create mode 100644 gdb-xml/mips-core.xml
 create mode 100644 gdb-xml/mips64-core.xml
configure +3 -0
index 8f8446f52b..5bb2c62194 100755
@@ -7466,12 +7466,14 @@ case "$target_name" in
   mips|mipsel)
     mttcg="yes"
     TARGET_ARCH=mips
+    gdb_xml_files="mips-core.xml"
     echo "TARGET_ABI_MIPSO32=y" >> $config_target_mak
   ;;
   mipsn32|mipsn32el)
     mttcg="yes"
     TARGET_ARCH=mips64
     TARGET_BASE_ARCH=mips
+    gdb_xml_files="mips64-core.xml"
     echo "TARGET_ABI_MIPSN32=y" >> $config_target_mak
     echo "TARGET_ABI32=y" >> $config_target_mak
   ;;
@@ -7479,6 +7481,7 @@ case "$target_name" in
     mttcg="yes"
     TARGET_ARCH=mips64
     TARGET_BASE_ARCH=mips
+    gdb_xml_files="mips64-core.xml"
     echo "TARGET_ABI_MIPSN64=y" >> $config_target_mak
   ;;
   moxie)
gdb-xml/mips-core.xml new file +4 -0
new file mode 100644
index 0000000000..a46b2993eb
@@ -0,0 +1,84 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2010-2019 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without

modification,

gdb-xml/mips-core.xml new file +80 -0
+     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.mips">
+  <reg name="zero" bitsize="32"/>
+  <reg name="at" bitsize="32"/>
+  <reg name="v0" bitsize="32"/>
+  <reg name="v1" bitsize="32"/>
+  <reg name="a0" bitsize="32"/>
+  <reg name="a1" bitsize="32"/>
+  <reg name="a2" bitsize="32"/>
+  <reg name="a3" bitsize="32"/>
+  <reg name="t0" bitsize="32"/>
+  <reg name="t1" bitsize="32"/>
+  <reg name="t2" bitsize="32"/>
+  <reg name="t3" bitsize="32"/>
+  <reg name="t4" bitsize="32"/>
+  <reg name="t5" bitsize="32"/>
+  <reg name="t6" bitsize="32"/>
+  <reg name="t7" bitsize="32"/>
+  <reg name="s0" bitsize="32"/>
+  <reg name="s1" bitsize="32"/>
+  <reg name="s2" bitsize="32"/>
+  <reg name="s3" bitsize="32"/>
+  <reg name="s4" bitsize="32"/>
+  <reg name="s5" bitsize="32"/>
+  <reg name="s6" bitsize="32"/>
+  <reg name="s7" bitsize="32"/>
+  <reg name="t8" bitsize="32"/>
+  <reg name="t9" bitsize="32"/>
+  <reg name="k0" bitsize="32"/>
+  <reg name="k1" bitsize="32"/>
+  <reg name="gp" bitsize="32"/>
+  <reg name="sp" bitsize="32"/>
+  <reg name="s8" bitsize="32"/>
+  <reg name="ra" bitsize="32"/>
+  <reg name="sr" bitsize="32"/>
+  <reg name="lo" bitsize="32"/>
+  <reg name="hi" bitsize="32"/>
+  <reg name="bad" bitsize="32"/>
+  <reg name="cause" bitsize="32"/>
+  <reg name="pc" bitsize="32"/>
+
+  <reg name="f0" bitsize="32" regnum="38"/>
+  <reg name="f1" bitsize="32"/>
+  <reg name="f2" bitsize="32"/>
+  <reg name="f3" bitsize="32"/>
+  <reg name="f4" bitsize="32"/>
+  <reg name="f5" bitsize="32"/>
+  <reg name="f6" bitsize="32"/>
+  <reg name="f7" bitsize="32"/>
+  <reg name="f8" bitsize="32"/>
+  <reg name="f9" bitsize="32"/>
+  <reg name="f10" bitsize="32"/>
+  <reg name="f11" bitsize="32"/>
+  <reg name="f12" bitsize="32"/>
+  <reg name="f13" bitsize="32"/>
+  <reg name="f14" bitsize="32"/>
+  <reg name="f15" bitsize="32"/>
+  <reg name="f16" bitsize="32"/>
+  <reg name="f17" bitsize="32"/>
+  <reg name="f18" bitsize="32"/>
+  <reg name="f19" bitsize="32"/>
+  <reg name="f20" bitsize="32"/>
+  <reg name="f21" bitsize="32"/>
+  <reg name="f22" bitsize="32"/>
+  <reg name="f23" bitsize="32"/>
+  <reg name="f24" bitsize="32"/>
+  <reg name="f25" bitsize="32"/>
+  <reg name="f26" bitsize="32"/>
+  <reg name="f27" bitsize="32"/>
+  <reg name="f28" bitsize="32"/>
+  <reg name="f29" bitsize="32"/>
+  <reg name="f30" bitsize="32"/>
+  <reg name="f31" bitsize="32"/>
+  <reg name="fsr" bitsize="32" group="float"/>
+  <reg name="fir" bitsize="32" group="float"/>
+  <reg name="fp" bitsize="32" group="float"/>
+</feature>
gdb-xml/mips64-core.xml new file +4 -0
new file mode 100644
index 0000000000..cc1a15ad56
@@ -0,0 +1,84 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2010-2019 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without

modification,

gdb-xml/mips64-core.xml new file +80 -0
+     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.mips64">
+  <reg name="zero" bitsize="64"/>
+  <reg name="at" bitsize="64"/>
+  <reg name="v0" bitsize="64"/>
+  <reg name="v1" bitsize="64"/>
+  <reg name="a0" bitsize="64"/>
+  <reg name="a1" bitsize="64"/>
+  <reg name="a2" bitsize="64"/>
+  <reg name="a3" bitsize="64"/>
+  <reg name="t0" bitsize="64"/>
+  <reg name="t1" bitsize="64"/>
+  <reg name="t2" bitsize="64"/>
+  <reg name="t3" bitsize="64"/>
+  <reg name="t4" bitsize="64"/>
+  <reg name="t5" bitsize="64"/>
+  <reg name="t6" bitsize="64"/>
+  <reg name="t7" bitsize="64"/>
+  <reg name="s0" bitsize="64"/>
+  <reg name="s1" bitsize="64"/>
+  <reg name="s2" bitsize="64"/>
+  <reg name="s3" bitsize="64"/>
+  <reg name="s4" bitsize="64"/>
+  <reg name="s5" bitsize="64"/>
+  <reg name="s6" bitsize="64"/>
+  <reg name="s7" bitsize="64"/>
+  <reg name="t8" bitsize="64"/>
+  <reg name="t9" bitsize="64"/>
+  <reg name="k0" bitsize="64"/>
+  <reg name="k1" bitsize="64"/>
+  <reg name="gp" bitsize="64"/>
+  <reg name="sp" bitsize="64"/>
+  <reg name="s8" bitsize="64"/>
+  <reg name="ra" bitsize="64"/>
+  <reg name="sr" bitsize="64"/>
+  <reg name="lo" bitsize="64"/>
+  <reg name="hi" bitsize="64"/>
+  <reg name="bad" bitsize="64"/>
+  <reg name="cause" bitsize="64"/>
+  <reg name="pc" bitsize="64"/>
+
+  <reg name="f0" bitsize="64" regnum="38"/>
+  <reg name="f1" bitsize="64"/>
+  <reg name="f2" bitsize="64"/>
+  <reg name="f3" bitsize="64"/>
+  <reg name="f4" bitsize="64"/>
+  <reg name="f5" bitsize="64"/>
+  <reg name="f6" bitsize="64"/>
+  <reg name="f7" bitsize="64"/>
+  <reg name="f8" bitsize="64"/>
+  <reg name="f9" bitsize="64"/>
+  <reg name="f10" bitsize="64"/>
+  <reg name="f11" bitsize="64"/>
+  <reg name="f12" bitsize="64"/>
+  <reg name="f13" bitsize="64"/>
+  <reg name="f14" bitsize="64"/>
+  <reg name="f15" bitsize="64"/>
+  <reg name="f16" bitsize="64"/>
+  <reg name="f17" bitsize="64"/>
+  <reg name="f18" bitsize="64"/>
+  <reg name="f19" bitsize="64"/>
+  <reg name="f20" bitsize="64"/>
+  <reg name="f21" bitsize="64"/>
+  <reg name="f22" bitsize="64"/>
+  <reg name="f23" bitsize="64"/>
+  <reg name="f24" bitsize="64"/>
+  <reg name="f25" bitsize="64"/>
+  <reg name="f26" bitsize="64"/>
+  <reg name="f27" bitsize="64"/>
+  <reg name="f28" bitsize="64"/>
+  <reg name="f29" bitsize="64"/>
+  <reg name="f30" bitsize="64"/>
+  <reg name="f31" bitsize="64"/>
+  <reg name="fsr" bitsize="64" group="float"/>
+  <reg name="fir" bitsize="64" group="float"/>
+  <reg name="fp" bitsize="64" group="float"/>
+</feature>
target/mips/cpu.c +5 -0
index bbcf7ca463..014f1db59e 100644
@@ -181,6 +181,11 @@ static ObjectClass *mips_cpu_class_by_name(const
 char *cpu_model)
     return oc;
 }
 
+static gchar *mips_gdb_arch_name(CPUState *cs)
+{
+    return g_strdup("mips");
+}
+
 static void mips_cpu_class_init(ObjectClass *c, void *data)
 {
     MIPSCPUClass *mcc = MIPS_CPU_CLASS(c);
target/mips/cpu.c +6 -0
@@ -213,6 +218,12 @@ static void mips_cpu_class_init(ObjectClass *c,
 void *data)
     cc->tlb_fill = mips_cpu_tlb_fill;
 #endif
 
+    cc->gdb_arch_name = mips_gdb_arch_name;
+#ifdef TARGET_MIPS64
+    cc->gdb_core_xml_file = "mips64-core.xml";
+#else
+    cc->gdb_core_xml_file = "mips-core.xml";
+#endif
     cc->gdb_num_core_regs = 73;
     cc->gdb_stop_before_watchpoint = true;
Quoted 1 line

}

--
Alex Bennée

#2 lore raw
Quoted 17 lines · Alex Bennée
Quoted 1 line · Mikhail Abakumov

From: Mikhail Abakumov <mikhail.abakumov@ispras>

Hmm the email got truncated here.

Quoted 9 lines

This patch add xml files with gdb registers for mips.

---
 configure               |  3 ++
 gdb-xml/mips-core.xml   | 84 +++++++++++++++++++++++++++++++++++++++++
 gdb-xml/mips64-core.xml | 84

+++++++++++++++++++++++++++++++++++++++++

Quoted 7 lines

Otherwise for the configure/xml:

I assume the changes will go in via a MIPS tree.

Yes, this should go via mips tree. Thanks for taking a look.

Mikhail, thanks for this effort.

Is there any way to include MSA registers, possibly in a separate file, and in a separate patch? What about a separate file for FPU registers? Can you take a look at corresponding solutions for other architectures?

Yours,
Aleksandar

Quoted 251 lines
Quoted 244 lines
 target/mips/cpu.c       | 11 ++++++
 4 files changed, 182 insertions(+)
 create mode 100644 gdb-xml/mips-core.xml
 create mode 100644 gdb-xml/mips64-core.xml
configure +3 -0
index 8f8446f52b..5bb2c62194 100755
@@ -7466,12 +7466,14 @@ case "$target_name" in
   mips|mipsel)
     mttcg="yes"
     TARGET_ARCH=mips
+    gdb_xml_files="mips-core.xml"
     echo "TARGET_ABI_MIPSO32=y" >> $config_target_mak
   ;;
   mipsn32|mipsn32el)
     mttcg="yes"
     TARGET_ARCH=mips64
     TARGET_BASE_ARCH=mips
+    gdb_xml_files="mips64-core.xml"
     echo "TARGET_ABI_MIPSN32=y" >> $config_target_mak
     echo "TARGET_ABI32=y" >> $config_target_mak
   ;;
@@ -7479,6 +7481,7 @@ case "$target_name" in
     mttcg="yes"
     TARGET_ARCH=mips64
     TARGET_BASE_ARCH=mips
+    gdb_xml_files="mips64-core.xml"
     echo "TARGET_ABI_MIPSN64=y" >> $config_target_mak
   ;;
   moxie)
gdb-xml/mips-core.xml new file +4 -0
new file mode 100644
index 0000000000..a46b2993eb
@@ -0,0 +1,84 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2010-2019 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without

modification,

gdb-xml/mips-core.xml new file +80 -0
+     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.mips">
+  <reg name="zero" bitsize="32"/>
+  <reg name="at" bitsize="32"/>
+  <reg name="v0" bitsize="32"/>
+  <reg name="v1" bitsize="32"/>
+  <reg name="a0" bitsize="32"/>
+  <reg name="a1" bitsize="32"/>
+  <reg name="a2" bitsize="32"/>
+  <reg name="a3" bitsize="32"/>
+  <reg name="t0" bitsize="32"/>
+  <reg name="t1" bitsize="32"/>
+  <reg name="t2" bitsize="32"/>
+  <reg name="t3" bitsize="32"/>
+  <reg name="t4" bitsize="32"/>
+  <reg name="t5" bitsize="32"/>
+  <reg name="t6" bitsize="32"/>
+  <reg name="t7" bitsize="32"/>
+  <reg name="s0" bitsize="32"/>
+  <reg name="s1" bitsize="32"/>
+  <reg name="s2" bitsize="32"/>
+  <reg name="s3" bitsize="32"/>
+  <reg name="s4" bitsize="32"/>
+  <reg name="s5" bitsize="32"/>
+  <reg name="s6" bitsize="32"/>
+  <reg name="s7" bitsize="32"/>
+  <reg name="t8" bitsize="32"/>
+  <reg name="t9" bitsize="32"/>
+  <reg name="k0" bitsize="32"/>
+  <reg name="k1" bitsize="32"/>
+  <reg name="gp" bitsize="32"/>
+  <reg name="sp" bitsize="32"/>
+  <reg name="s8" bitsize="32"/>
+  <reg name="ra" bitsize="32"/>
+  <reg name="sr" bitsize="32"/>
+  <reg name="lo" bitsize="32"/>
+  <reg name="hi" bitsize="32"/>
+  <reg name="bad" bitsize="32"/>
+  <reg name="cause" bitsize="32"/>
+  <reg name="pc" bitsize="32"/>
+
+  <reg name="f0" bitsize="32" regnum="38"/>
+  <reg name="f1" bitsize="32"/>
+  <reg name="f2" bitsize="32"/>
+  <reg name="f3" bitsize="32"/>
+  <reg name="f4" bitsize="32"/>
+  <reg name="f5" bitsize="32"/>
+  <reg name="f6" bitsize="32"/>
+  <reg name="f7" bitsize="32"/>
+  <reg name="f8" bitsize="32"/>
+  <reg name="f9" bitsize="32"/>
+  <reg name="f10" bitsize="32"/>
+  <reg name="f11" bitsize="32"/>
+  <reg name="f12" bitsize="32"/>
+  <reg name="f13" bitsize="32"/>
+  <reg name="f14" bitsize="32"/>
+  <reg name="f15" bitsize="32"/>
+  <reg name="f16" bitsize="32"/>
+  <reg name="f17" bitsize="32"/>
+  <reg name="f18" bitsize="32"/>
+  <reg name="f19" bitsize="32"/>
+  <reg name="f20" bitsize="32"/>
+  <reg name="f21" bitsize="32"/>
+  <reg name="f22" bitsize="32"/>
+  <reg name="f23" bitsize="32"/>
+  <reg name="f24" bitsize="32"/>
+  <reg name="f25" bitsize="32"/>
+  <reg name="f26" bitsize="32"/>
+  <reg name="f27" bitsize="32"/>
+  <reg name="f28" bitsize="32"/>
+  <reg name="f29" bitsize="32"/>
+  <reg name="f30" bitsize="32"/>
+  <reg name="f31" bitsize="32"/>
+  <reg name="fsr" bitsize="32" group="float"/>
+  <reg name="fir" bitsize="32" group="float"/>
+  <reg name="fp" bitsize="32" group="float"/>
+</feature>
gdb-xml/mips64-core.xml new file +4 -0
new file mode 100644
index 0000000000..cc1a15ad56
@@ -0,0 +1,84 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2010-2019 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without

modification,

gdb-xml/mips64-core.xml new file +80 -0
+     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.mips64">
+  <reg name="zero" bitsize="64"/>
+  <reg name="at" bitsize="64"/>
+  <reg name="v0" bitsize="64"/>
+  <reg name="v1" bitsize="64"/>
+  <reg name="a0" bitsize="64"/>
+  <reg name="a1" bitsize="64"/>
+  <reg name="a2" bitsize="64"/>
+  <reg name="a3" bitsize="64"/>
+  <reg name="t0" bitsize="64"/>
+  <reg name="t1" bitsize="64"/>
+  <reg name="t2" bitsize="64"/>
+  <reg name="t3" bitsize="64"/>
+  <reg name="t4" bitsize="64"/>
+  <reg name="t5" bitsize="64"/>
+  <reg name="t6" bitsize="64"/>
+  <reg name="t7" bitsize="64"/>
+  <reg name="s0" bitsize="64"/>
+  <reg name="s1" bitsize="64"/>
+  <reg name="s2" bitsize="64"/>
+  <reg name="s3" bitsize="64"/>
+  <reg name="s4" bitsize="64"/>
+  <reg name="s5" bitsize="64"/>
+  <reg name="s6" bitsize="64"/>
+  <reg name="s7" bitsize="64"/>
+  <reg name="t8" bitsize="64"/>
+  <reg name="t9" bitsize="64"/>
+  <reg name="k0" bitsize="64"/>
+  <reg name="k1" bitsize="64"/>
+  <reg name="gp" bitsize="64"/>
+  <reg name="sp" bitsize="64"/>
+  <reg name="s8" bitsize="64"/>
+  <reg name="ra" bitsize="64"/>
+  <reg name="sr" bitsize="64"/>
+  <reg name="lo" bitsize="64"/>
+  <reg name="hi" bitsize="64"/>
+  <reg name="bad" bitsize="64"/>
+  <reg name="cause" bitsize="64"/>
+  <reg name="pc" bitsize="64"/>
+
+  <reg name="f0" bitsize="64" regnum="38"/>
+  <reg name="f1" bitsize="64"/>
+  <reg name="f2" bitsize="64"/>
+  <reg name="f3" bitsize="64"/>
+  <reg name="f4" bitsize="64"/>
+  <reg name="f5" bitsize="64"/>
+  <reg name="f6" bitsize="64"/>
+  <reg name="f7" bitsize="64"/>
+  <reg name="f8" bitsize="64"/>
+  <reg name="f9" bitsize="64"/>
+  <reg name="f10" bitsize="64"/>
+  <reg name="f11" bitsize="64"/>
+  <reg name="f12" bitsize="64"/>
+  <reg name="f13" bitsize="64"/>
+  <reg name="f14" bitsize="64"/>
+  <reg name="f15" bitsize="64"/>
+  <reg name="f16" bitsize="64"/>
+  <reg name="f17" bitsize="64"/>
+  <reg name="f18" bitsize="64"/>
+  <reg name="f19" bitsize="64"/>
+  <reg name="f20" bitsize="64"/>
+  <reg name="f21" bitsize="64"/>
+  <reg name="f22" bitsize="64"/>
+  <reg name="f23" bitsize="64"/>
+  <reg name="f24" bitsize="64"/>
+  <reg name="f25" bitsize="64"/>
+  <reg name="f26" bitsize="64"/>
+  <reg name="f27" bitsize="64"/>
+  <reg name="f28" bitsize="64"/>
+  <reg name="f29" bitsize="64"/>
+  <reg name="f30" bitsize="64"/>
+  <reg name="f31" bitsize="64"/>
+  <reg name="fsr" bitsize="64" group="float"/>
+  <reg name="fir" bitsize="64" group="float"/>
+  <reg name="fp" bitsize="64" group="float"/>
+</feature>
target/mips/cpu.c +5 -0
index bbcf7ca463..014f1db59e 100644
@@ -181,6 +181,11 @@ static ObjectClass *mips_cpu_class_by_name(const
 char *cpu_model)
     return oc;
 }
 
+static gchar *mips_gdb_arch_name(CPUState *cs)
+{
+    return g_strdup("mips");
+}
+
 static void mips_cpu_class_init(ObjectClass *c, void *data)
 {
     MIPSCPUClass *mcc = MIPS_CPU_CLASS(c);
target/mips/cpu.c +6 -0
@@ -213,6 +218,12 @@ static void mips_cpu_class_init(ObjectClass *c,
 void *data)
     cc->tlb_fill = mips_cpu_tlb_fill;
 #endif
 
+    cc->gdb_arch_name = mips_gdb_arch_name;
+#ifdef TARGET_MIPS64
+    cc->gdb_core_xml_file = "mips64-core.xml";
+#else
+    cc->gdb_core_xml_file = "mips-core.xml";
+#endif
     cc->gdb_num_core_regs = 73;
     cc->gdb_stop_before_watchpoint = true;
Quoted 1 line

}

--
Alex Bennée

#3 lore raw

Aleksandar Markovic писал 2019-10-08 16:37:

Quoted 26 lines
Quoted 14 lines · Alex Bennée
Quoted 1 line · Mikhail Abakumov

From: Mikhail Abakumov <mikhail.abakumov@ispras>

Hmm the email got truncated here.

Quoted 7 lines

This patch add xml files with gdb registers for mips.

---
configure | 3 ++
gdb-xml/mips-core.xml | 84

+++++++++++++++++++++++++++++++++++++++++

Quoted 8 lines
Quoted 2 lines

gdb-xml/mips64-core.xml | 84
+++++++++++++++++++++++++++++++++++++++++

Otherwise for the configure/xml:

I assume the changes will go in via a MIPS tree.

Quoted 8 lines

Yes, this should go via mips tree. Thanks for taking a look.

Mikhail, thanks for this effort.

Is there any way to include MSA registers, possibly in a separate file, and in a separate patch? What about a separate file for FPU registers? Can you take a look at corresponding solutions for other architectures?

Thanks for the feedback.

Yes, I did it initially. But looking at other architectures, redid it. Everywhere, one main xml-file is used for registers, described in the target/gdbstub. And additional ones are appended through 'gdb_register_coprocessor'.
In the current patch, I made a description of the registers described only in the target/gdbstub. In the future, I think FPU registers can be moved to a separate file, but then need to move them from the mips/gdbstub.

Quoted 256 lines

Yours,
Aleksandar

Quoted 252 lines
Quoted 42 lines

target/mips/cpu.c | 11 ++++++

4 files changed, 182 insertions(+)

create mode 100644 gdb-xml/mips-core.xml
create mode 100644 gdb-xml/mips64-core.xml

configure +0 -0
index 8f8446f52b..5bb2c62194 100755
@@ -7466,12 +7466,14 @@ case "$target_name" in
 mips|mipsel)

mttcg="yes"
TARGET_ARCH=mips
+ gdb_xml_files="mips-core.xml"
echo "TARGET_ABI_MIPSO32=y" >> $config_target_mak
;;
mipsn32|mipsn32el)
mttcg="yes"
TARGET_ARCH=mips64
TARGET_BASE_ARCH=mips
+ gdb_xml_files="mips64-core.xml"
echo "TARGET_ABI_MIPSN32=y" >> $config_target_mak
echo "TARGET_ABI32=y" >> $config_target_mak
;;

configure +0 -0
@@ -7479,6 +7481,7 @@ case "$target_name" in

mttcg="yes"
TARGET_ARCH=mips64
TARGET_BASE_ARCH=mips
+ gdb_xml_files="mips64-core.xml"
echo "TARGET_ABI_MIPSN64=y" >> $config_target_mak
;;
moxie)

gdb-xml/mips-core.xml new file +4 -0
new file mode 100644
index 0000000000..a46b2993eb
@@ -0,0 +1,84 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2010-2019 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without
Quoted 2 lines

modification,
+ are permitted in any medium without royalty provided the

copyright

Quoted 89 lines

+ notice and this notice are preserved. -->

gdb-xml/mips-core.xml new file +78 -0
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.mips">
+ <reg name="zero" bitsize="32"/>
+ <reg name="at" bitsize="32"/>
+ <reg name="v0" bitsize="32"/>
+ <reg name="v1" bitsize="32"/>
+ <reg name="a0" bitsize="32"/>
+ <reg name="a1" bitsize="32"/>
+ <reg name="a2" bitsize="32"/>
+ <reg name="a3" bitsize="32"/>
+ <reg name="t0" bitsize="32"/>
+ <reg name="t1" bitsize="32"/>
+ <reg name="t2" bitsize="32"/>
+ <reg name="t3" bitsize="32"/>
+ <reg name="t4" bitsize="32"/>
+ <reg name="t5" bitsize="32"/>
+ <reg name="t6" bitsize="32"/>
+ <reg name="t7" bitsize="32"/>
+ <reg name="s0" bitsize="32"/>
+ <reg name="s1" bitsize="32"/>
+ <reg name="s2" bitsize="32"/>
+ <reg name="s3" bitsize="32"/>
+ <reg name="s4" bitsize="32"/>
+ <reg name="s5" bitsize="32"/>
+ <reg name="s6" bitsize="32"/>
+ <reg name="s7" bitsize="32"/>
+ <reg name="t8" bitsize="32"/>
+ <reg name="t9" bitsize="32"/>
+ <reg name="k0" bitsize="32"/>
+ <reg name="k1" bitsize="32"/>
+ <reg name="gp" bitsize="32"/>
+ <reg name="sp" bitsize="32"/>
+ <reg name="s8" bitsize="32"/>
+ <reg name="ra" bitsize="32"/>
+ <reg name="sr" bitsize="32"/>
+ <reg name="lo" bitsize="32"/>
+ <reg name="hi" bitsize="32"/>
+ <reg name="bad" bitsize="32"/>
+ <reg name="cause" bitsize="32"/>
+ <reg name="pc" bitsize="32"/>
+
+ <reg name="f0" bitsize="32" regnum="38"/>
+ <reg name="f1" bitsize="32"/>
+ <reg name="f2" bitsize="32"/>
+ <reg name="f3" bitsize="32"/>
+ <reg name="f4" bitsize="32"/>
+ <reg name="f5" bitsize="32"/>
+ <reg name="f6" bitsize="32"/>
+ <reg name="f7" bitsize="32"/>
+ <reg name="f8" bitsize="32"/>
+ <reg name="f9" bitsize="32"/>
+ <reg name="f10" bitsize="32"/>
+ <reg name="f11" bitsize="32"/>
+ <reg name="f12" bitsize="32"/>
+ <reg name="f13" bitsize="32"/>
+ <reg name="f14" bitsize="32"/>
+ <reg name="f15" bitsize="32"/>
+ <reg name="f16" bitsize="32"/>
+ <reg name="f17" bitsize="32"/>
+ <reg name="f18" bitsize="32"/>
+ <reg name="f19" bitsize="32"/>
+ <reg name="f20" bitsize="32"/>
+ <reg name="f21" bitsize="32"/>
+ <reg name="f22" bitsize="32"/>
+ <reg name="f23" bitsize="32"/>
+ <reg name="f24" bitsize="32"/>
+ <reg name="f25" bitsize="32"/>
+ <reg name="f26" bitsize="32"/>
+ <reg name="f27" bitsize="32"/>
+ <reg name="f28" bitsize="32"/>
+ <reg name="f29" bitsize="32"/>
+ <reg name="f30" bitsize="32"/>
+ <reg name="f31" bitsize="32"/>
+ <reg name="fsr" bitsize="32" group="float"/>
+ <reg name="fir" bitsize="32" group="float"/>
+ <reg name="fp" bitsize="32" group="float"/>
+</feature>
gdb-xml/mips64-core.xml new file +4 -0
new file mode 100644
index 0000000000..cc1a15ad56
@@ -0,0 +1,84 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2010-2019 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without
Quoted 2 lines

modification,
+ are permitted in any medium without royalty provided the

copyright

target/mips/cpu.c static ObjectClass

Quoted 84 lines

+ notice and this notice are preserved. -->

gdb-xml/mips64-core.xml new file +78 -0
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.mips64">
+ <reg name="zero" bitsize="64"/>
+ <reg name="at" bitsize="64"/>
+ <reg name="v0" bitsize="64"/>
+ <reg name="v1" bitsize="64"/>
+ <reg name="a0" bitsize="64"/>
+ <reg name="a1" bitsize="64"/>
+ <reg name="a2" bitsize="64"/>
+ <reg name="a3" bitsize="64"/>
+ <reg name="t0" bitsize="64"/>
+ <reg name="t1" bitsize="64"/>
+ <reg name="t2" bitsize="64"/>
+ <reg name="t3" bitsize="64"/>
+ <reg name="t4" bitsize="64"/>
+ <reg name="t5" bitsize="64"/>
+ <reg name="t6" bitsize="64"/>
+ <reg name="t7" bitsize="64"/>
+ <reg name="s0" bitsize="64"/>
+ <reg name="s1" bitsize="64"/>
+ <reg name="s2" bitsize="64"/>
+ <reg name="s3" bitsize="64"/>
+ <reg name="s4" bitsize="64"/>
+ <reg name="s5" bitsize="64"/>
+ <reg name="s6" bitsize="64"/>
+ <reg name="s7" bitsize="64"/>
+ <reg name="t8" bitsize="64"/>
+ <reg name="t9" bitsize="64"/>
+ <reg name="k0" bitsize="64"/>
+ <reg name="k1" bitsize="64"/>
+ <reg name="gp" bitsize="64"/>
+ <reg name="sp" bitsize="64"/>
+ <reg name="s8" bitsize="64"/>
+ <reg name="ra" bitsize="64"/>
+ <reg name="sr" bitsize="64"/>
+ <reg name="lo" bitsize="64"/>
+ <reg name="hi" bitsize="64"/>
+ <reg name="bad" bitsize="64"/>
+ <reg name="cause" bitsize="64"/>
+ <reg name="pc" bitsize="64"/>
+
+ <reg name="f0" bitsize="64" regnum="38"/>
+ <reg name="f1" bitsize="64"/>
+ <reg name="f2" bitsize="64"/>
+ <reg name="f3" bitsize="64"/>
+ <reg name="f4" bitsize="64"/>
+ <reg name="f5" bitsize="64"/>
+ <reg name="f6" bitsize="64"/>
+ <reg name="f7" bitsize="64"/>
+ <reg name="f8" bitsize="64"/>
+ <reg name="f9" bitsize="64"/>
+ <reg name="f10" bitsize="64"/>
+ <reg name="f11" bitsize="64"/>
+ <reg name="f12" bitsize="64"/>
+ <reg name="f13" bitsize="64"/>
+ <reg name="f14" bitsize="64"/>
+ <reg name="f15" bitsize="64"/>
+ <reg name="f16" bitsize="64"/>
+ <reg name="f17" bitsize="64"/>
+ <reg name="f18" bitsize="64"/>
+ <reg name="f19" bitsize="64"/>
+ <reg name="f20" bitsize="64"/>
+ <reg name="f21" bitsize="64"/>
+ <reg name="f22" bitsize="64"/>
+ <reg name="f23" bitsize="64"/>
+ <reg name="f24" bitsize="64"/>
+ <reg name="f25" bitsize="64"/>
+ <reg name="f26" bitsize="64"/>
+ <reg name="f27" bitsize="64"/>
+ <reg name="f28" bitsize="64"/>
+ <reg name="f29" bitsize="64"/>
+ <reg name="f30" bitsize="64"/>
+ <reg name="f31" bitsize="64"/>
+ <reg name="fsr" bitsize="64" group="float"/>
+ <reg name="fir" bitsize="64" group="float"/>
+ <reg name="fp" bitsize="64" group="float"/>
+</feature>
target/mips/cpu.c +0 -0
index bbcf7ca463..014f1db59e 100644
@@ -181,6 +181,11 @@ static ObjectClass

*mips_cpu_class_by_name(const

target/mips/cpu.c static void mips_cpu_class_init(ObjectClass

Quoted 13 lines
target/mips/cpu.c +5 -0
 char *cpu_model)
 return oc;
 }
 
+static gchar *mips_gdb_arch_name(CPUState *cs)
+{
+ return g_strdup("mips");
+}
+
 static void mips_cpu_class_init(ObjectClass *c, void *data)
 {

MIPSCPUClass *mcc = MIPS_CPU_CLASS(c);

target/mips/cpu.c +0 -0
@@ -213,6 +218,12 @@ static void mips_cpu_class_init(ObjectClass

*c,

Quoted 12 lines
target/mips/cpu.c +6 -0
 void *data)
 cc->tlb_fill = mips_cpu_tlb_fill;
 #endif
 
+ cc->gdb_arch_name = mips_gdb_arch_name;
+#ifdef TARGET_MIPS64
+ cc->gdb_core_xml_file = "mips64-core.xml";
+#else
+ cc->gdb_core_xml_file = "mips-core.xml";
+#endif
 cc->gdb_num_core_regs = 73;
 cc->gdb_stop_before_watchpoint = true;
Quoted 1 line

}

--
Alex Bennée

Signature · 1 line
Mikhail Abakumov
#4 lore raw
Quoted 45 lines · Mikhail Abakumov

Aleksandar Markovic писал 2019-10-08 16:37:

Quoted 31 lines

On Monday, October 7, 2019, Alex Bennée <[email protected]> wrote:

Quoted 20 lines · Mikhail Abakumov

From: Mikhail Abakumov <mikhail.abakumov@ispras>

Quoted 1 line

Hmm the email got truncated here.

Quoted 7 lines

This patch add xml files with gdb registers for mips.

---
configure | 3 ++
gdb-xml/mips-core.xml | 84

+++++++++++++++++++++++++++++++++++++++++

Quoted 3 lines

gdb-xml/mips64-core.xml | 84
+++++++++++++++++++++++++++++++++++++++++

Quoted 6 lines

Otherwise for the configure/xml:

I assume the changes will go in via a MIPS tree.

Quoted 9 lines

Yes, this should go via mips tree. Thanks for taking a look.

Mikhail, thanks for this effort.

Is there any way to include MSA registers, possibly in a separate file, and in a separate patch? What about a separate file for FPU registers? Can you take a look at corresponding solutions for other architectures?

Thanks for the feedback.

Quoted 8 lines

Yes, I did it initially. But looking at other architectures, redid it. Everywhere, one main xml-file is used for registers, described in the target/gdbstub. And additional ones are appended through 'gdb_register_coprocessor'.
In the current patch, I made a description of the registers described only in the target/gdbstub. In the future, I think FPU registers can be moved to a separate file, but then need to move them from the mips/gdbstub.

Mikhail,

Your implementation assumes that 64-bit CPU always has 64-bit FPU, and 32-bit CPU - 32-bit FPU. However, that is not always true.

Please see related patch for RISC-V:

https://patchew.org/QEMU/[email protected]/

... and correct your solution in a similar way.

Keep also in mind that, in general, gdb xml support should work for all (or at least, almost all) QEMU-supported MIPS CPUs, not just the most common. For example, is your solution correct for R4000 CPU? Is the register layout the same for, for example, "ancient" R4000 and "moderm" I6400?

Thanks again!

Aleksandar

Quoted 270 lines
Quoted 267 lines

Yours,
Aleksandar

target/mips/cpu.c | 11 ++++++

Quoted 261 lines
Quoted 41 lines
4 files changed, 182 insertions(+)

create mode 100644 gdb-xml/mips-core.xml
create mode 100644 gdb-xml/mips64-core.xml

configure +0 -0
index 8f8446f52b..5bb2c62194 100755
@@ -7466,12 +7466,14 @@ case "$target_name" in
 mips|mipsel)

mttcg="yes"
TARGET_ARCH=mips
+ gdb_xml_files="mips-core.xml"
echo "TARGET_ABI_MIPSO32=y" >> $config_target_mak
;;
mipsn32|mipsn32el)
mttcg="yes"
TARGET_ARCH=mips64
TARGET_BASE_ARCH=mips
+ gdb_xml_files="mips64-core.xml"
echo "TARGET_ABI_MIPSN32=y" >> $config_target_mak
echo "TARGET_ABI32=y" >> $config_target_mak
;;

configure +0 -0
@@ -7479,6 +7481,7 @@ case "$target_name" in

mttcg="yes"
TARGET_ARCH=mips64
TARGET_BASE_ARCH=mips
+ gdb_xml_files="mips64-core.xml"
echo "TARGET_ABI_MIPSN64=y" >> $config_target_mak
;;
moxie)

gdb-xml/mips-core.xml new file +4 -0
new file mode 100644
index 0000000000..a46b2993eb
@@ -0,0 +1,84 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2010-2019 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without
Quoted 3 lines

modification,
+ are permitted in any medium without royalty provided the

copyright

Quoted 89 lines

+ notice and this notice are preserved. -->

gdb-xml/mips-core.xml new file +78 -0
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.mips">
+ <reg name="zero" bitsize="32"/>
+ <reg name="at" bitsize="32"/>
+ <reg name="v0" bitsize="32"/>
+ <reg name="v1" bitsize="32"/>
+ <reg name="a0" bitsize="32"/>
+ <reg name="a1" bitsize="32"/>
+ <reg name="a2" bitsize="32"/>
+ <reg name="a3" bitsize="32"/>
+ <reg name="t0" bitsize="32"/>
+ <reg name="t1" bitsize="32"/>
+ <reg name="t2" bitsize="32"/>
+ <reg name="t3" bitsize="32"/>
+ <reg name="t4" bitsize="32"/>
+ <reg name="t5" bitsize="32"/>
+ <reg name="t6" bitsize="32"/>
+ <reg name="t7" bitsize="32"/>
+ <reg name="s0" bitsize="32"/>
+ <reg name="s1" bitsize="32"/>
+ <reg name="s2" bitsize="32"/>
+ <reg name="s3" bitsize="32"/>
+ <reg name="s4" bitsize="32"/>
+ <reg name="s5" bitsize="32"/>
+ <reg name="s6" bitsize="32"/>
+ <reg name="s7" bitsize="32"/>
+ <reg name="t8" bitsize="32"/>
+ <reg name="t9" bitsize="32"/>
+ <reg name="k0" bitsize="32"/>
+ <reg name="k1" bitsize="32"/>
+ <reg name="gp" bitsize="32"/>
+ <reg name="sp" bitsize="32"/>
+ <reg name="s8" bitsize="32"/>
+ <reg name="ra" bitsize="32"/>
+ <reg name="sr" bitsize="32"/>
+ <reg name="lo" bitsize="32"/>
+ <reg name="hi" bitsize="32"/>
+ <reg name="bad" bitsize="32"/>
+ <reg name="cause" bitsize="32"/>
+ <reg name="pc" bitsize="32"/>
+
+ <reg name="f0" bitsize="32" regnum="38"/>
+ <reg name="f1" bitsize="32"/>
+ <reg name="f2" bitsize="32"/>
+ <reg name="f3" bitsize="32"/>
+ <reg name="f4" bitsize="32"/>
+ <reg name="f5" bitsize="32"/>
+ <reg name="f6" bitsize="32"/>
+ <reg name="f7" bitsize="32"/>
+ <reg name="f8" bitsize="32"/>
+ <reg name="f9" bitsize="32"/>
+ <reg name="f10" bitsize="32"/>
+ <reg name="f11" bitsize="32"/>
+ <reg name="f12" bitsize="32"/>
+ <reg name="f13" bitsize="32"/>
+ <reg name="f14" bitsize="32"/>
+ <reg name="f15" bitsize="32"/>
+ <reg name="f16" bitsize="32"/>
+ <reg name="f17" bitsize="32"/>
+ <reg name="f18" bitsize="32"/>
+ <reg name="f19" bitsize="32"/>
+ <reg name="f20" bitsize="32"/>
+ <reg name="f21" bitsize="32"/>
+ <reg name="f22" bitsize="32"/>
+ <reg name="f23" bitsize="32"/>
+ <reg name="f24" bitsize="32"/>
+ <reg name="f25" bitsize="32"/>
+ <reg name="f26" bitsize="32"/>
+ <reg name="f27" bitsize="32"/>
+ <reg name="f28" bitsize="32"/>
+ <reg name="f29" bitsize="32"/>
+ <reg name="f30" bitsize="32"/>
+ <reg name="f31" bitsize="32"/>
+ <reg name="fsr" bitsize="32" group="float"/>
+ <reg name="fir" bitsize="32" group="float"/>
+ <reg name="fp" bitsize="32" group="float"/>
+</feature>
gdb-xml/mips64-core.xml new file +4 -0
new file mode 100644
index 0000000000..cc1a15ad56
@@ -0,0 +1,84 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2010-2019 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without
Quoted 3 lines

modification,
+ are permitted in any medium without royalty provided the

copyright

Quoted 84 lines

+ notice and this notice are preserved. -->

gdb-xml/mips64-core.xml new file +78 -0
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.mips64">
+ <reg name="zero" bitsize="64"/>
+ <reg name="at" bitsize="64"/>
+ <reg name="v0" bitsize="64"/>
+ <reg name="v1" bitsize="64"/>
+ <reg name="a0" bitsize="64"/>
+ <reg name="a1" bitsize="64"/>
+ <reg name="a2" bitsize="64"/>
+ <reg name="a3" bitsize="64"/>
+ <reg name="t0" bitsize="64"/>
+ <reg name="t1" bitsize="64"/>
+ <reg name="t2" bitsize="64"/>
+ <reg name="t3" bitsize="64"/>
+ <reg name="t4" bitsize="64"/>
+ <reg name="t5" bitsize="64"/>
+ <reg name="t6" bitsize="64"/>
+ <reg name="t7" bitsize="64"/>
+ <reg name="s0" bitsize="64"/>
+ <reg name="s1" bitsize="64"/>
+ <reg name="s2" bitsize="64"/>
+ <reg name="s3" bitsize="64"/>
+ <reg name="s4" bitsize="64"/>
+ <reg name="s5" bitsize="64"/>
+ <reg name="s6" bitsize="64"/>
+ <reg name="s7" bitsize="64"/>
+ <reg name="t8" bitsize="64"/>
+ <reg name="t9" bitsize="64"/>
+ <reg name="k0" bitsize="64"/>
+ <reg name="k1" bitsize="64"/>
+ <reg name="gp" bitsize="64"/>
+ <reg name="sp" bitsize="64"/>
+ <reg name="s8" bitsize="64"/>
+ <reg name="ra" bitsize="64"/>
+ <reg name="sr" bitsize="64"/>
+ <reg name="lo" bitsize="64"/>
+ <reg name="hi" bitsize="64"/>
+ <reg name="bad" bitsize="64"/>
+ <reg name="cause" bitsize="64"/>
+ <reg name="pc" bitsize="64"/>
+
+ <reg name="f0" bitsize="64" regnum="38"/>
+ <reg name="f1" bitsize="64"/>
+ <reg name="f2" bitsize="64"/>
+ <reg name="f3" bitsize="64"/>
+ <reg name="f4" bitsize="64"/>
+ <reg name="f5" bitsize="64"/>
+ <reg name="f6" bitsize="64"/>
+ <reg name="f7" bitsize="64"/>
+ <reg name="f8" bitsize="64"/>
+ <reg name="f9" bitsize="64"/>
+ <reg name="f10" bitsize="64"/>
+ <reg name="f11" bitsize="64"/>
+ <reg name="f12" bitsize="64"/>
+ <reg name="f13" bitsize="64"/>
+ <reg name="f14" bitsize="64"/>
+ <reg name="f15" bitsize="64"/>
+ <reg name="f16" bitsize="64"/>
+ <reg name="f17" bitsize="64"/>
+ <reg name="f18" bitsize="64"/>
+ <reg name="f19" bitsize="64"/>
+ <reg name="f20" bitsize="64"/>
+ <reg name="f21" bitsize="64"/>
+ <reg name="f22" bitsize="64"/>
+ <reg name="f23" bitsize="64"/>
+ <reg name="f24" bitsize="64"/>
+ <reg name="f25" bitsize="64"/>
+ <reg name="f26" bitsize="64"/>
+ <reg name="f27" bitsize="64"/>
+ <reg name="f28" bitsize="64"/>
+ <reg name="f29" bitsize="64"/>
+ <reg name="f30" bitsize="64"/>
+ <reg name="f31" bitsize="64"/>
+ <reg name="fsr" bitsize="64" group="float"/>
+ <reg name="fir" bitsize="64" group="float"/>
+ <reg name="fp" bitsize="64" group="float"/>
+</feature>
target/mips/cpu.c +0 -0
index bbcf7ca463..014f1db59e 100644

target/mips/cpu.c static ObjectClass · line 181

Quoted 1 line
target/mips/cpu.c +0 -0
@@ -181,6 +181,11 @@ static ObjectClass
 

*mips_cpu_class_by_name(const

Quoted 13 lines
target/mips/cpu.c +5 -0
 char *cpu_model)
 return oc;
 }
 
+static gchar *mips_gdb_arch_name(CPUState *cs)
+{
+ return g_strdup("mips");
+}
+
 static void mips_cpu_class_init(ObjectClass *c, void *data)

{
MIPSCPUClass *mcc = MIPS_CPU_CLASS(c);

target/mips/cpu.c static void mips_cpu_class_init(ObjectClass · line 218

Quoted 1 line
target/mips/cpu.c +0 -0
@@ -213,6 +218,12 @@ static void mips_cpu_class_init(ObjectClass
 

*c,

Quoted 11 lines
target/mips/cpu.c +6 -0
 void *data)
 cc->tlb_fill = mips_cpu_tlb_fill;
 #endif
 
+ cc->gdb_arch_name = mips_gdb_arch_name;
+#ifdef TARGET_MIPS64
+ cc->gdb_core_xml_file = "mips64-core.xml";
+#else
+ cc->gdb_core_xml_file = "mips-core.xml";
+#endif
 cc->gdb_num_core_regs = 73;
Quoted 3 lines

cc->gdb_stop_before_watchpoint = true;
}

--
Alex Bennée

--
Mikhail Abakumov