2013-02-04 12:48:37 +00:00
|
|
|
<?xml version="1.0"?>
|
2015-01-01 09:32:14 +00:00
|
|
|
<!-- Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
2013-02-04 12:48:37 +00:00
|
|
|
Contributed by ARM Ltd.
|
|
|
|
|
|
|
|
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.aarch64.core">
|
|
|
|
<reg name="x0" bitsize="64"/>
|
|
|
|
<reg name="x1" bitsize="64"/>
|
|
|
|
<reg name="x2" bitsize="64"/>
|
|
|
|
<reg name="x3" bitsize="64"/>
|
|
|
|
<reg name="x4" bitsize="64"/>
|
|
|
|
<reg name="x5" bitsize="64"/>
|
|
|
|
<reg name="x6" bitsize="64"/>
|
|
|
|
<reg name="x7" bitsize="64"/>
|
|
|
|
<reg name="x8" bitsize="64"/>
|
|
|
|
<reg name="x9" bitsize="64"/>
|
|
|
|
<reg name="x10" bitsize="64"/>
|
|
|
|
<reg name="x11" bitsize="64"/>
|
|
|
|
<reg name="x12" bitsize="64"/>
|
|
|
|
<reg name="x13" bitsize="64"/>
|
|
|
|
<reg name="x14" bitsize="64"/>
|
|
|
|
<reg name="x15" bitsize="64"/>
|
|
|
|
<reg name="x16" bitsize="64"/>
|
|
|
|
<reg name="x17" bitsize="64"/>
|
|
|
|
<reg name="x18" bitsize="64"/>
|
|
|
|
<reg name="x19" bitsize="64"/>
|
|
|
|
<reg name="x20" bitsize="64"/>
|
|
|
|
<reg name="x21" bitsize="64"/>
|
|
|
|
<reg name="x22" bitsize="64"/>
|
|
|
|
<reg name="x23" bitsize="64"/>
|
|
|
|
<reg name="x24" bitsize="64"/>
|
|
|
|
<reg name="x25" bitsize="64"/>
|
|
|
|
<reg name="x26" bitsize="64"/>
|
|
|
|
<reg name="x27" bitsize="64"/>
|
|
|
|
<reg name="x28" bitsize="64"/>
|
|
|
|
<reg name="x29" bitsize="64"/>
|
|
|
|
<reg name="x30" bitsize="64"/>
|
|
|
|
<reg name="sp" bitsize="64" type="data_ptr"/>
|
|
|
|
|
|
|
|
<reg name="pc" bitsize="64" type="code_ptr"/>
|
Aarch64: Make CPSR a 32-bit register again in the target description
This reverts commit a4d9ba85 - 'AARCH64: Change cpsr type to be
64bit.'.
Even though Linux's ptrace exposes CPSR as 64-bit, CPSR is really
32-bit, and basing GDB's fundamentals on a particular OS's ptrace(2)
implementation is a bad idea.
In addition, while that commit intended to fix big endian Aarch64, it
ended up breaking floating point debugging against GDBserver, for both
big and little endian, because it changed the CPSR to be 64-bit in the
features/aarch64-core.xml file, but missed regenerating the
regformats/aarch64.dat file. If we generate it now, we see this:
diff --git c/gdb/regformats/aarch64.dat w/gdb/regformats/aarch64.dat
index afe1028..0d32183 100644
--- c/gdb/regformats/aarch64.dat
+++ w/gdb/regformats/aarch64.dat
@@ -35,7 +35,7 @@ expedite:x29,sp,pc
64:x30
64:sp
64:pc
-32:cpsr
+64:cpsr
128:v0
128:v1
128:v2
IOW, that commit left regformats/aarch64.dat still considering CPSR as
32-bits. regformats/aarch64.dat is used by GDBserver for its internal
regcache layout, and for the g/G packet register block. See the
generated aarch64.c file in GDBserver's build dir.
So the target description xml file that GDBserver reports to GDB is
now claiming that CPSR is 64-bit, but what GDBserver actually puts in
the g/G register packets is 32-bits. Because GDB thinks CPSR is
64-bit (because that's what the XML description says), GDB will be
reading the remaining 32-bit bits of CPSR out of v0 (the register
immediately afterwards), and then all the registers that follow CPSR
in the register packet end up wrong in GDB, because they're being read
from the wrong offsets...
gdb/
2014-10-01 Pedro Alves <palves@redhat.com>
* features/aarch64-core.xml (cpsr): Change back to 32-bit.
* features/aarch64.c: Regenerate.
2014-10-01 09:06:45 +00:00
|
|
|
<reg name="cpsr" bitsize="32"/>
|
2013-02-04 12:48:37 +00:00
|
|
|
</feature>
|