GNU Binutils with patches for OS216
修訂 | 9e237747bd1fd7b371fed5edb91dd9baace4b2dc (tree) |
---|---|
時間 | 2018-11-07 02:54:08 |
作者 | Marius Muench <marius.muench@eure...> |
Commiter | Tom Tromey |
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.
@@ -1,3 +1,8 @@ | ||
1 | +2018-11-06 Marius Muench <marius.muench@eurecom.fr> | |
2 | + | |
3 | + * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg | |
4 | + when on AAPCS. | |
5 | + | |
1 | 6 | 2018-11-06 John Baldwin <jhb@FreeBSD.org> |
2 | 7 | |
3 | 8 | * riscv-fbsd-nat.c (getregs_supplies): Return true for |
@@ -1801,6 +1801,10 @@ arm_scan_prologue (struct frame_info *this_frame, | ||
1801 | 1801 | CORE_ADDR frame_loc; |
1802 | 1802 | ULONGEST return_value; |
1803 | 1803 | |
1804 | + /* AAPCS does not use a frame register, so we can abort here. */ | |
1805 | + if (gdbarch_tdep (gdbarch)->arm_abi == ARM_ABI_AAPCS) | |
1806 | + return; | |
1807 | + | |
1804 | 1808 | frame_loc = get_frame_register_unsigned (this_frame, ARM_FP_REGNUM); |
1805 | 1809 | if (!safe_read_memory_unsigned_integer (frame_loc, 4, byte_order, |
1806 | 1810 | &return_value)) |