This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit/7.1] Fix an ARM single-stepping bug
- From: Daniel Jacobowitz <dan at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 26 Feb 2010 15:47:52 -0500
- Subject: [commit/7.1] Fix an ARM single-stepping bug
I discovered a typo in the Thumb-2 software single step routine.
Sometimes we'd step over a taken conditional branch and go off into
the woods. I've checked in this obvious (in hindsight) patch, to
trunk and branch.
Tested on arm-none-linux-gnueabi.
--
Daniel Jacobowitz
CodeSourcery
2010-02-26 Daniel Jacobowitz <dan@codesourcery.com>
* arm-tdep.c (thumb_get_next_pc): Correct conditional branch opcode.
Index: arm-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-tdep.c,v
retrieving revision 1.296
diff -u -p -r1.296 arm-tdep.c
--- arm-tdep.c 1 Feb 2010 16:16:26 -0000 1.296
+++ arm-tdep.c 26 Feb 2010 20:36:37 -0000
@@ -2503,7 +2503,7 @@ thumb_get_next_pc (struct frame_info *fr
nextpc = get_frame_register_unsigned (frame, ARM_LR_REGNUM);
nextpc -= inst2 & 0x00ff;
}
- else if ((inst2 & 0xd000) == 0xc000 && (inst1 & 0x0380) != 0x0380)
+ else if ((inst2 & 0xd000) == 0x8000 && (inst1 & 0x0380) != 0x0380)
{
/* Conditional branch. */
if (condition_true (bits (inst1, 6, 9), status))