[PATCH 2/2] aarch64: tramp_frame_start function need to read instrs correctly in be8 case
Victor Kamensky
victor.kamensky@linaro.org
Mon Oct 27 03:14:00 GMT 2014
tramp_frame_start function needs to read instructions in
gdbarch_byte_order_for_code byte order, because in case aarch64_be,
even data is big endian, instructions are still little endian.
Currently function uses gdbarch_byte_order which would be
big endian in aarch64_be case.
Because of this issue pretty much all tests that involve backtrace
of stack with signal frame are failing on aarch64_be target.
Fix is to change gdbarch_byte_order to gdbarch_byte_order_for_code,
when passed to extract_unsigned_integer that reads instruction.
gdb/ChangeLog:
2014-10-24 Victor Kamensky <victor.kamensky@linaro.org>
* gdb/tramp-frame.c (tramp_frame_start): Use
gdbarch_byte_order_for_code to read aarch64 instruction.
---
gdb/tramp-frame.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/tramp-frame.c b/gdb/tramp-frame.c
index 0fd6ddc..41dcd94 100644
--- a/gdb/tramp-frame.c
+++ b/gdb/tramp-frame.c
@@ -83,7 +83,7 @@ tramp_frame_start (const struct tramp_frame *tramp,
struct frame_info *this_frame, CORE_ADDR pc)
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+ enum bfd_endian byte_order = gdbarch_byte_order_for_code (gdbarch);
int ti;
/* Search through the trampoline for one that matches the
--
1.8.1.4
More information about the Gdb-patches
mailing list