Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <qiyaoltc@gmail.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 3/3] Use aarch64_decode_insn in aarch64_displaced_step_copy_insn
Date: Thu, 29 Oct 2015 17:09:00 -0000	[thread overview]
Message-ID: <1446129722-11855-4-git-send-email-yao.qi@linaro.org> (raw)
In-Reply-To: <1446129722-11855-1-git-send-email-yao.qi@linaro.org>

gdb:

2015-10-29  Yao Qi  <yao.qi@linaro.org>

	* aarch64-tdep.c (aarch64_displaced_step_copy_insn): Call
	aarch64_decode_insn and decode instruction by aarch64_inst.
---
 gdb/aarch64-tdep.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c
index 4bdd227..bc282e9 100644
--- a/gdb/aarch64-tdep.c
+++ b/gdb/aarch64-tdep.c
@@ -2500,9 +2500,13 @@ aarch64_displaced_step_copy_insn (struct gdbarch *gdbarch,
   enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
   uint32_t insn = read_memory_unsigned_integer (from, 4, byte_order_for_code);
   struct aarch64_displaced_step_data dsd;
+  aarch64_inst inst;
+
+  if (aarch64_decode_insn (insn, &inst, 1) != 0)
+    return NULL;
 
   /* Look for a Load Exclusive instruction which begins the sequence.  */
-  if (decode_masked_match (insn, 0x3fc00000, 0x08400000))
+  if (inst.opcode->iclass == ldstexcl && bit (insn, 22))
     {
       /* We can't displaced step atomic sequences.  */
       return NULL;
-- 
1.9.1


  parent reply	other threads:[~2015-10-29 14:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-29 16:47 [PATCH 0/3] Use aarch64_decode_insn more in GDB Yao Qi
2015-10-29 16:51 ` [PATCH 2/3] Use aarch64_decode_insn in aarch64_analyze_prologue Yao Qi
2015-10-29 17:05 ` [PATCH 1/3] Combine aarch64_decode_stp_offset_wb and aarch64_decode_stp_offset Yao Qi
2015-10-29 17:09 ` Yao Qi [this message]
2015-11-05  9:45 ` [PATCH 0/3] Use aarch64_decode_insn more in GDB Yao Qi
2015-11-05  9:54   ` Pedro Alves
2015-11-05 10:35   ` Yao Qi

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=1446129722-11855-4-git-send-email-yao.qi@linaro.org \
    --to=qiyaoltc@gmail.com \
    --cc=gdb-patches@sourceware.org \
    /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