]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
ChangeLog:
authorUlrich Weigand <uweigand@de.ibm.com>
Wed, 1 Aug 2012 12:57:07 +0000 (12:57 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Wed, 1 Aug 2012 12:57:07 +0000 (12:57 +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 a80cc8da3c9fffbb75a60229f4bc9a812606ce3a..901b908b5b6d4d1c0854a5891f823e9551b9d80c 100644 (file)
@@ -1,3 +1,8 @@
+2012-08-01  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-31  Andreas Schwab  <schwab@linux-m68k.org>
 
        * ppc-linux-tdep.c (ppc_linux_init_abi): Register
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 1d9557c20f9ef578862cf37248353885776fda13..e8ca002498c9a3be410b6f29b415711b8c9581d1 100644 (file)
@@ -1,3 +1,8 @@
+2012-08-01  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>
 
        * server.c (process_point_options): Stop at 'X' when parsing.
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
     {