summaryrefslogtreecommitdiff
path: root/gdb/arm-tdep.c
diff options
context:
space:
mode:
authorqiyao <qiyao>2011-10-11 07:31:26 +0000
committerqiyao <qiyao>2011-10-11 07:31:26 +0000
commit9eeeb6380672dd85d864d2f3f7f812ad650fcb64 (patch)
tree5274b7d37f59a0ffe08461c1165e39d85fd350ad /gdb/arm-tdep.c
parent3a5a60f49439291709100ed6d0882a91077fa4d2 (diff)
downloadgdb-9eeeb6380672dd85d864d2f3f7f812ad650fcb64.tar.gz
gdb/
* arm-tdep.c (arm_get_next_pc_raw): Use read_memory_unsigned_integer to get address.
Diffstat (limited to 'gdb/arm-tdep.c')
-rw-r--r--gdb/arm-tdep.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 278e6e94091..add6be871d7 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -4779,8 +4779,9 @@ arm_get_next_pc_raw (struct frame_info *frame, CORE_ADDR pc)
else
base -= offset;
}
- nextpc = (CORE_ADDR) read_memory_integer ((CORE_ADDR) base,
- 4, byte_order);
+ nextpc =
+ (CORE_ADDR) read_memory_unsigned_integer ((CORE_ADDR) base,
+ 4, byte_order);
}
}
break;
@@ -4794,6 +4795,9 @@ arm_get_next_pc_raw (struct frame_info *frame, CORE_ADDR pc)
{
/* loading pc */
int offset = 0;
+ unsigned long rn_val
+ = get_frame_register_unsigned (frame,
+ bits (this_instr, 16, 19));
if (bit (this_instr, 23))
{
@@ -4806,15 +4810,10 @@ arm_get_next_pc_raw (struct frame_info *frame, CORE_ADDR pc)
else if (bit (this_instr, 24))
offset = -4;
- {
- unsigned long rn_val =
- get_frame_register_unsigned (frame,
- bits (this_instr, 16, 19));
- nextpc =
- (CORE_ADDR) read_memory_integer ((CORE_ADDR) (rn_val
- + offset),
- 4, byte_order);
- }
+ nextpc =
+ (CORE_ADDR) read_memory_unsigned_integer ((CORE_ADDR)
+ (rn_val + offset),
+ 4, byte_order);
}
}
break;