diff options
author | Marius Muench <marius.muench@eurecom.fr> | 2018-11-06 10:51:39 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-11-06 10:54:08 -0700 |
commit | 9e237747bd1fd7b371fed5edb91dd9baace4b2dc (patch) | |
tree | d5e90dfef0d7019ee222846b01061c7bb79013a7 /gdb/arm-tdep.c | |
parent | bcecc11da243fe5c333f9d2d914663d09f4b868d (diff) | |
download | gdb-9e237747bd1fd7b371fed5edb91dd9baace4b2dc.zip gdb-9e237747bd1fd7b371fed5edb91dd9baace4b2dc.tar.gz gdb-9e237747bd1fd7b371fed5edb91dd9baace4b2dc.tar.bz2 |
ARM: Do not use FP reg when on AAPCS
GDB tries to dereference the frame pointer in arm_scan_prologue as a
last resort to create frame information.
However, the more recent AAPCS ABI does not make use of a frame pointer.
This patch checks whether the specified arm_abi is AAPCS before
dereferencing the "frame pointer". If so, just return as efforts to use
it for restoring frame information won't work.
gdb/ChangeLog
2018-11-06 Marius Muench <marius.muench@eurecom.fr>
* arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
when on AAPCS.
Diffstat (limited to 'gdb/arm-tdep.c')
-rw-r--r-- | gdb/arm-tdep.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 53eee76..0165e92 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -1801,6 +1801,10 @@ arm_scan_prologue (struct frame_info *this_frame, CORE_ADDR frame_loc; ULONGEST return_value; + /* AAPCS does not use a frame register, so we can abort here. */ + if (gdbarch_tdep (gdbarch)->arm_abi == ARM_ABI_AAPCS) + return; + frame_loc = get_frame_register_unsigned (this_frame, ARM_FP_REGNUM); if (!safe_read_memory_unsigned_integer (frame_loc, 4, byte_order, &return_value)) |