gdb/
[deliverable/binutils-gdb.git] / gdb / arm-linux-nat.c
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);
 }
 
This page took 0.027868 seconds and 4 git commands to generate.