aboutsummaryrefslogtreecommitdiff
path: root/gdb/arm-linux-nat.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2012-07-30 15:05:43 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2012-07-30 15:05:43 +0000
commitfcf303aba3608fe6a3d359f43e3cd52715481825 (patch)
treed773a44edee9d2d48556bddf0b2235681cccfe02 /gdb/arm-linux-nat.c
parent4e969b4f01286290f5d06e41dd8e8a2c738d7650 (diff)
downloadgdb-fcf303aba3608fe6a3d359f43e3cd52715481825.zip
gdb-fcf303aba3608fe6a3d359f43e3cd52715481825.tar.gz
gdb-fcf303aba3608fe6a3d359f43e3cd52715481825.tar.bz2
ChangeLog:
* 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.
Diffstat (limited to 'gdb/arm-linux-nat.c')
-rw-r--r--gdb/arm-linux-nat.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c
index 2485a84..bf81c03 100644
--- a/gdb/arm-linux-nat.c
+++ b/gdb/arm-linux-nat.c
@@ -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);
}