gdb-xml: fix hacks in powerpc register numbering
The powerpc xml files contained a hack--an empty, non-existent
register--for getting the register numbers to line up for
newer (XML-aware) and older (non-XML-aware) GDB. While this hack worked
in some cases, it didn't work in all cases, notably when the user used
`finish' or `continue': GDB would attempt to read the non-existent
register and QEMU would complain.
This patch fixes things up properly. Instead of inserting a fake
register, we explicitly declare the floating-point and SPE registers to
start at 71. This action accomplishes the same thing as the nasty hack,
except that now GDB never tries to fetch the non-existant register 70.
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
diff --git a/gdb-xml/power-fpu.xml b/gdb-xml/power-fpu.xml
index d1ca3a3..3870551 100644
--- a/gdb-xml/power-fpu.xml
+++ b/gdb-xml/power-fpu.xml
@@ -7,7 +7,7 @@
<!DOCTYPE feature SYSTEM "gdb-target.dtd">
<feature name="org.gnu.gdb.power.fpu">
- <reg name="f0" bitsize="64" type="ieee_double"/>
+ <reg name="f0" bitsize="64" type="ieee_double" regnum="71"/>
<reg name="f1" bitsize="64" type="ieee_double"/>
<reg name="f2" bitsize="64" type="ieee_double"/>
<reg name="f3" bitsize="64" type="ieee_double"/>