This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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))


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]