aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2010-10-19 21:30:54 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2010-10-19 21:30:54 +0000
commitad8b5167d76f8e4883d6ac138c27994cfed77b99 (patch)
tree0cb753e125980436b9a00e0aa8899c3b6e02b416 /gdb
parent8e6a5956eb3663614eb9db7e24ca1dc5aa7a7e6a (diff)
downloadgdb-ad8b5167d76f8e4883d6ac138c27994cfed77b99.zip
gdb-ad8b5167d76f8e4883d6ac138c27994cfed77b99.tar.gz
gdb-ad8b5167d76f8e4883d6ac138c27994cfed77b99.tar.bz2
* arm-tdep.c (thumb_get_next_pc_raw): Handle Thumb-16 encoding
for "mov pc, REG" as well. (thumb_instruction_changes_pc): Likewise.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/arm-tdep.c12
2 files changed, 18 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 13336ba..5242f61 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2010-10-19 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * arm-tdep.c (thumb_get_next_pc_raw): Handle Thumb-16 encoding
+ for "mov pc, REG" as well.
+ (thumb_instruction_changes_pc): Likewise.
+
2010-10-19 Sami Wagiaalla <swagiaal@redhat.com>
PR C++/11500:
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 5b32b8a..2df96cd 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -537,6 +537,9 @@ thumb_instruction_changes_pc (unsigned short inst)
if ((inst & 0xff00) == 0x4700) /* bx REG, blx REG */
return 1;
+ if ((inst & 0xff87) == 0x4687) /* mov pc, REG */
+ return 1;
+
if ((inst & 0xf500) == 0xb100) /* CBNZ or CBZ. */
return 1;
@@ -3572,6 +3575,15 @@ thumb_get_next_pc_raw (struct frame_info *frame, CORE_ADDR pc, int insert_bkpt)
else
nextpc = get_frame_register_unsigned (frame, bits (inst1, 3, 6));
}
+ else if ((inst1 & 0xff87) == 0x4687) /* mov pc, REG */
+ {
+ if (bits (inst1, 3, 6) == 0x0f)
+ nextpc = pc_val;
+ else
+ nextpc = get_frame_register_unsigned (frame, bits (inst1, 3, 6));
+
+ nextpc = MAKE_THUMB_ADDR (nextpc);
+ }
else if ((inst1 & 0xf500) == 0xb100)
{
/* CBNZ or CBZ. */