gdbstub: Make base register explicit in m68k GDB XML files
Both gdb-xml/cf-fp.xml and gdb-xml/m68k-fp.xml aren't imported from GDB repository. Presumably they are hand-written, and lack the @regnum XML tag. This might explain why gdb_register_coprocessor() have a @g_pos argument, only used for these 2 m68k files. Fixes: 56aebc89167 ("Add GDB XML register description support") Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Tested-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Link: https://lore.kernel.org/qemu-devel/20260310232045.58440-10-philmd@linaro.org Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Philippe Mathieu-Daudé committed
Mar 11, 2026 at 00:20 UTC
9aad3f83a574b1a234c54101ce3ee9608b4762f4
3 files changed
+4
-4
gdb-xml/cf-fp.xml
+1
-1
@@ -6,7 +6,7 @@
6
notice and this notice are preserved. -->
7
<!DOCTYPE feature SYSTEM "gdb-target.dtd">
8
<feature name="org.gnu.gdb.coldfire.fp">
9
- <reg name="fp0" bitsize="64" type="float" group="float"/>
9
+ <reg name="fp0" bitsize="64" type="float" group="float" regnum="18"/>
10
<reg name="fp1" bitsize="64" type="float" group="float"/>
11
<reg name="fp2" bitsize="64" type="float" group="float"/>
12
<reg name="fp3" bitsize="64" type="float" group="float"/>
gdb-xml/m68k-fp.xml
+1
-1
@@ -6,7 +6,7 @@
6
notice and this notice are preserved. -->
7
<!DOCTYPE feature SYSTEM "gdb-target.dtd">
8
<feature name="org.gnu.gdb.coldfire.fp">
9
- <reg name="fp0" bitsize="96" type="float" group="float"/>
9
+ <reg name="fp0" bitsize="96" type="float" group="float" regnum="18"/>
10
<reg name="fp1" bitsize="96" type="float" group="float"/>
11
<reg name="fp2" bitsize="96" type="float" group="float"/>
12
<reg name="fp3" bitsize="96" type="float" group="float"/>
target/m68k/helper.c
+2
-2
@@ -129,10 +129,10 @@ void m68k_cpu_init_gdb(M68kCPU *cpu)
129
130
if (m68k_feature(env, M68K_FEATURE_CF_FPU)) {
131
gdb_register_coprocessor(cs, cf_fpu_gdb_get_reg, cf_fpu_gdb_set_reg,
132
- gdb_find_static_feature("cf-fp.xml"), 18);
132
+ gdb_find_static_feature("cf-fp.xml"), 0);
133
} else if (m68k_feature(env, M68K_FEATURE_FPU)) {
134
gdb_register_coprocessor(cs, m68k_fpu_gdb_get_reg, m68k_fpu_gdb_set_reg,
135
- gdb_find_static_feature("m68k-fp.xml"), 18);
135
+ gdb_find_static_feature("m68k-fp.xml"), 0);
136
}
137
/* TODO: Add [E]MAC registers. */
138
}