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]

[ob] Thumb-2 stepping fix


Antti Hatala reported off-list that I got the test for IT instructions
wrong.  I've tested this fix on arm-none-eabi and checked it in.

I hope we'll be able to remove this error in the next couple of months
- but I don't know quite how yet :-(  I'm still thinking about it, but
the problem is thorny.

-- 
Daniel Jacobowitz
CodeSourcery

2009-10-28  Daniel Jacobowitz  <dan@codesourcery.com>

	Reported by Antti Hatala <ahatala@nvidia.com>.

	* arm-tdep.c (thumb_get_next_pc): Limit check to IT instructions
	correctly.

Index: arm-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-tdep.c,v
retrieving revision 1.291
diff -u -p -r1.291 arm-tdep.c
--- arm-tdep.c	19 Oct 2009 09:51:40 -0000	1.291
+++ arm-tdep.c	28 Oct 2009 20:15:24 -0000
@@ -2284,7 +2284,7 @@ thumb_get_next_pc (struct frame_info *fr
   /* On GNU/Linux, where this routine is used, we use an undefined
      instruction as a breakpoint.  Unlike BKPT, IT can disable execution
      of the undefined instruction.  So we might miss the breakpoint!  */
-  if ((inst1 & 0xff00) == 0xbf00 || (it & 0x0f))
+  if (((inst1 & 0xff00) == 0xbf00 && (inst1 & 0x000f) != 0) || (it & 0x0f))
     error (_("Stepping through Thumb-2 IT blocks is not yet supported"));
 
   if (it & 0x0f)


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