From: Paul Brook <paul@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: ARM singlestep bug
Date: Thu, 25 Jan 2007 19:23:00 -0000 [thread overview]
Message-ID: <200701251923.41153.paul@codesourcery.com> (raw)
The patch below fixes a bug in arm_get_next_pc. The test for the BX
instruction was incorrectly including the first bit of the condition code.
Bit 28 is clear on unconditonal BX instructions, so it works by chance most
of the time.
Ok?
Paul
2007-01-25 Paul Brook <paul@codesourcery.com>
gdb/
* arm-tdep.c (arm_get_next_pc): Fix bitfield off-by-one error.
Index: gdb/arm-tdep.c
===================================================================
--- gdb/arm-tdep.c (revision 158575)
+++ gdb/arm-tdep.c (working copy)
@@ -1693,8 +1693,8 @@ arm_get_next_pc (CORE_ADDR pc)
error (_("Invalid update to pc in instruction"));
/* BX <reg>, BLX <reg> */
- if (bits (this_instr, 4, 28) == 0x12fff1
- || bits (this_instr, 4, 28) == 0x12fff3)
+ if (bits (this_instr, 4, 27) == 0x12fff1
+ || bits (this_instr, 4, 27) == 0x12fff3)
{
rn = bits (this_instr, 0, 3);
result = (rn == 15) ? pc_val + 8 : read_register (rn);
next reply other threads:[~2007-01-25 19:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-25 19:23 Paul Brook [this message]
2007-01-25 19:25 ` Daniel Jacobowitz
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=200701251923.41153.paul@codesourcery.com \
--to=paul@codesourcery.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