Message ID | 1414379668-5351-3-git-send-email-victor.kamensky@linaro.org |
---|---|
State | New |
Headers | show |
Victor Kamensky <victor.kamensky@linaro.org> writes: Looks the problem this patch fixes isn't arch specific. This problem exists for a while, but is exposed by your configuration (data endianness != instruction endianness). gdbarch_byte_order_for_code must be used for reading instructions. > gdb/ChangeLog: > > 2014-10-24 Victor Kamensky <victor.kamensky@linaro.org> An empty line here is needed. > * 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; Please rename variable byte_order to byte_order_for_code. OK with these changes.
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