diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2012-07-30 15:05:40 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2012-07-30 15:05:40 +0000 |
commit | 63c451d5ea057f23a287c9b1ac846b59a4a9c028 (patch) | |
tree | 3b54753bb5a0d7264e23a88ba556aaecafeb2383 /gdb/arm-linux-nat.c | |
parent | c79947181e0021676f840b630ab61051bc8c987b (diff) | |
download | gdb-63c451d5ea057f23a287c9b1ac846b59a4a9c028.tar.gz |
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.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c index 2485a84e3a7..bf81c032a9b 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); } |