aboutsummaryrefslogtreecommitdiff
path: root/gdb/arm-tdep.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2012-08-22 19:47:58 +0000
committerJoseph Myers <joseph@codesourcery.com>2012-08-22 19:47:58 +0000
commit6ca1b1476715499432ef8ea211fa0ea5c0e412c4 (patch)
tree0cd389f13b7b14771afef2b6c03fa2d62b7561ec /gdb/arm-tdep.c
parent8315665ec17eb95a2e12599d6dfb18aa45a12eb6 (diff)
downloadgdb-6ca1b1476715499432ef8ea211fa0ea5c0e412c4.zip
gdb-6ca1b1476715499432ef8ea211fa0ea5c0e412c4.tar.gz
gdb-6ca1b1476715499432ef8ea211fa0ea5c0e412c4.tar.bz2
* arm-tdep.c (thumb_get_next_pc_raw): Mask off low bits for bx pc
and blx pc. testsuite: * gdb.arch/thumb-bx-pc.S: New file. * gdb.arch/thumb-bx-pc.exp: New file.
Diffstat (limited to 'gdb/arm-tdep.c')
-rw-r--r--gdb/arm-tdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 063c1db..cddb88c 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -4540,7 +4540,7 @@ thumb_get_next_pc_raw (struct frame_info *frame, CORE_ADDR pc)
else if ((inst1 & 0xff00) == 0x4700) /* bx REG, blx REG */
{
if (bits (inst1, 3, 6) == 0x0f)
- nextpc = pc_val;
+ nextpc = UNMAKE_THUMB_ADDR (pc_val);
else
nextpc = get_frame_register_unsigned (frame, bits (inst1, 3, 6));
}