From: Victor Kamensky <victor.kamensky@linaro.org>
To: gdb-patches@sourceware.org
Cc: Yao Qi <yao@codesourcery.com>, Andrew Pinski <pinskia@gmail.com>,
victor.kamensky@linaro.org
Subject: [PATCH 2/2] aarch64: tramp_frame_start function need to read instrs correctly in be8 case
Date: Mon, 27 Oct 2014 03:14:00 -0000 [thread overview]
Message-ID: <1414379668-5351-3-git-send-email-victor.kamensky@linaro.org> (raw)
In-Reply-To: <1414379668-5351-1-git-send-email-victor.kamensky@linaro.org>
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
next prev parent reply other threads:[~2014-10-27 3:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-27 3:14 [PATCH 0/2] aarch64 couple big endian fixes Victor Kamensky
2014-10-27 3:14 ` Victor Kamensky [this message]
2014-10-29 6:07 ` [PATCH 2/2] aarch64: tramp_frame_start function need to read instrs correctly in be8 case Yao Qi
2014-10-27 3:14 ` [PATCH 1/2] aarch64: handle big endian float registers correctly Victor Kamensky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1414379668-5351-3-git-send-email-victor.kamensky@linaro.org \
--to=victor.kamensky@linaro.org \
--cc=gdb-patches@sourceware.org \
--cc=pinskia@gmail.com \
--cc=yao@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).