aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2010-02-01 16:13:17 +0000
committerDaniel Jacobowitz <drow@false.org>2010-02-01 16:13:17 +0000
commit177321bd85d5a3d4ca05d320696d8af43bc0fc05 (patch)
treeffd4365fcfcbd8de561b1f7d37570927d180b9d6 /gdb/gdbserver
parenta1dcb23a280b453738e569f0f7674dbd8ca39933 (diff)
downloadgdb-177321bd85d5a3d4ca05d320696d8af43bc0fc05.zip
gdb-177321bd85d5a3d4ca05d320696d8af43bc0fc05.tar.gz
gdb-177321bd85d5a3d4ca05d320696d8af43bc0fc05.tar.bz2
* arm-linux-tdep.c (arm_linux_thumb2_be_breakpoint)
(arm_linux_thumb2_le_breakpoint): New constants. (arm_linux_init_abi): Set thumb2_breakpoint and thumb2_breakpoint_size. * arm-tdep.c (thumb_insn_size, thumb_advance_itstate): New functions. (thumb_get_next_pc): Add a comment. Rename IT to ITSTATE. Implement support for single stepping through IT blocks if a 32-bit Thumb breakpoint instruction is available. (arm_breakpoint_from_pc): If a 32-bit Thumb breakpoint instruction is available, use it when needed. (arm_remote_breakpoint_from_pc): New function. (arm_gdbarch_init): Register arm_remote_breakpoint_from_pc. * arm-tdep.h (struct gdbarch_tdep): Correct thumb_breakpoint comment. Add thumb2_breakpoint and thumb2_breakpoint_size. gdbserver/ * linux-arm-low.c (thumb_breakpoint_len): Delete. (thumb2_breakpoint): New. (arm_breakpoint_at): Check for Thumb-2 breakpoints. testsuite/ * gdb.arch/thumb2-it.S, gdb.arch/thumb2-it.exp: New files.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog6
-rw-r--r--gdb/gdbserver/linux-arm-low.c9
2 files changed, 14 insertions, 1 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index fc6b6e2..e62f630 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,9 @@
+2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * linux-arm-low.c (thumb_breakpoint_len): Delete.
+ (thumb2_breakpoint): New.
+ (arm_breakpoint_at): Check for Thumb-2 breakpoints.
+
2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
* linux-low.c (get_stop_pc): Check for SIGTRAP.
diff --git a/gdb/gdbserver/linux-arm-low.c b/gdb/gdbserver/linux-arm-low.c
index e0afd3a..54668f8 100644
--- a/gdb/gdbserver/linux-arm-low.c
+++ b/gdb/gdbserver/linux-arm-low.c
@@ -203,7 +203,7 @@ arm_set_pc (struct regcache *regcache, CORE_ADDR pc)
static const unsigned long arm_breakpoint = 0xef9f0001;
#define arm_breakpoint_len 4
static const unsigned short thumb_breakpoint = 0xde01;
-#define thumb_breakpoint_len 2
+static const unsigned short thumb2_breakpoint[] = { 0xf7f0, 0xa000 };
/* For new EABI binaries. We recognize it regardless of which ABI
is used for gdbserver, so single threaded debugging should work
@@ -227,6 +227,13 @@ arm_breakpoint_at (CORE_ADDR where)
(*the_target->read_memory) (where, (unsigned char *) &insn, 2);
if (insn == thumb_breakpoint)
return 1;
+
+ if (insn == thumb2_breakpoint[0])
+ {
+ (*the_target->read_memory) (where + 2, (unsigned char *) &insn, 2);
+ if (insn == thumb2_breakpoint[1])
+ return 1;
+ }
}
else
{