-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
target/arm: Use correct GDB XML for M-profile cores
GDB's remote protocol requires M-profile cores to use the feature name 'org.gnu.gdb.arm.m-profile' instead of the 'org.gnu.gdb.arm.core' feature used for A- and R-profile cores. We weren't doing this, which meant GDB treated our M-profile cores like A-profile ones. This mostly doesn't matter, but for instance means that it doesn't correctly handle backtraces where an M-profile exception frame is involved. Ship a copy of GDB's arm-m-profile.xml and use it on the M-profile cores. The integer registers have the same offsets as the arm-core.xml, but register 25 is the M-profile XPSR rather than the A-profile CPSR, so we need to update arm_cpu_gdb_read_register() and arm_cpu_gdb_write_register() to handle XSPR reads and writes. Fixes: https://bugs.launchpad.net/qemu/+bug/1877136 Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20200507134755.13997-1-peter.maydell@linaro.org
- Loading branch information
Showing
4 changed files
with
48 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0"?> | ||
<!-- Copyright (C) 2010-2020 Free Software Foundation, Inc. | ||
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.arm.m-profile"> | ||
<reg name="r0" bitsize="32"/> | ||
<reg name="r1" bitsize="32"/> | ||
<reg name="r2" bitsize="32"/> | ||
<reg name="r3" bitsize="32"/> | ||
<reg name="r4" bitsize="32"/> | ||
<reg name="r5" bitsize="32"/> | ||
<reg name="r6" bitsize="32"/> | ||
<reg name="r7" bitsize="32"/> | ||
<reg name="r8" bitsize="32"/> | ||
<reg name="r9" bitsize="32"/> | ||
<reg name="r10" bitsize="32"/> | ||
<reg name="r11" bitsize="32"/> | ||
<reg name="r12" bitsize="32"/> | ||
<reg name="sp" bitsize="32" type="data_ptr"/> | ||
<reg name="lr" bitsize="32"/> | ||
<reg name="pc" bitsize="32" type="code_ptr"/> | ||
<reg name="xpsr" bitsize="32" regnum="25"/> | ||
</feature> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters