ChangeLog:
authorUlrich Weigand <uweigand@de.ibm.com>
Mon, 30 Jul 2012 15:05:43 +0000 (15:05 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Mon, 30 Jul 2012 15:05:43 +0000 (15:05 +0000)
* arm-linux-nat.c (arm_linux_hw_breakpoint_initialize): Do not
attempt to 4-byte-align HW breakpoint addresses for Thumb.

gdbserver/ChangeLog:

* linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
to 4-byte-align HW breakpoint addresses for Thumb.

gdb/ChangeLog
gdb/arm-linux-nat.c
gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-arm-low.c

index 4e83c25973b26115b794223ca1ce41043324bab5..7ca0070f06c8cd8b289b7b54824e4167832182c4 100644 (file)
@@ -1,3 +1,8 @@
+2012-07-30  Ulrich Weigand  <ulrich.weigand@linaro.org>
+
+       * arm-linux-nat.c (arm_linux_hw_breakpoint_initialize): Do not
+       attempt to 4-byte-align HW breakpoint addresses for Thumb.
+
 2012-07-30  Andrew Burgess  <aburgess@broadcom.com>
 
        * varobj.c (varobj_invalidate_iter): All varobj must be marked as
index 2485a84e3a7c5a6c45cc6372021278bd68287457..bf81c032a9bb38bb1a754e25eefe794e25f38116 100644 (file)
@@ -896,11 +896,17 @@ arm_linux_hw_breakpoint_initialize (struct gdbarch *gdbarch,
   /* We have to create a mask for the control register which says which bits
      of the word pointed to by address to break on.  */
   if (arm_pc_is_thumb (gdbarch, address))
-    mask = 0x3 << (address & 2);
+    {
+      mask = 0x3;
+      address &= ~1;
+    }
   else
-    mask = 0xf;
+    {
+      mask = 0xf;
+      address &= ~3;
+    }
 
-  p->address = (unsigned int) (address & ~3);
+  p->address = (unsigned int) address;
   p->control = arm_hwbp_control_initialize (mask, arm_hwbp_break, 1);
 }
 
index 98757963b81fa03cbde4299dc5ce3f20720e06f6..08a8d3adaa632077970d70bcd7fea59e5978fed8 100644 (file)
@@ -1,3 +1,8 @@
+2012-07-30  Ulrich Weigand  <ulrich.weigand@linaro.org>
+
+       * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
+       to 4-byte-align HW breakpoint addresses for Thumb.
+
 2012-07-27  Yao Qi  <yao@codesourcery.com>
 
        PR remote/14161.
index c4d2000c3b179727910d61dd1b2dc335fc7b7a74..10370834fcf6b59d76f69557bfbe44920de98c1a 100644 (file)
@@ -474,17 +474,17 @@ arm_linux_hw_point_initialize (char type, CORE_ADDR addr, int len,
        {
        case 2:  /* 16-bit Thumb mode breakpoint */
        case 3:  /* 32-bit Thumb mode breakpoint */
-         mask = 0x3 << (addr & 2);
+         mask = 0x3;
+         addr &= ~1;
          break;
        case 4:  /* 32-bit ARM mode breakpoint */
          mask = 0xf;
+         addr &= ~3;
          break;
        default:
          /* Unsupported. */
          return -1;
        }
-
-      addr &= ~3;
     }
   else
     {
This page took 0.034949 seconds and 4 git commands to generate.