aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2011-10-11 07:31:29 +0000
committerYao Qi <yao@codesourcery.com>2011-10-11 07:31:29 +0000
commit51370a3384dd01bdb0e31816588a1fa74962c5ce (patch)
tree0eb3e2705c044ff74a1591753fd9b0733e8bef23
parentb228303dd14e6ef1fbee7ffa8db7054a999c02a6 (diff)
downloadgdb-51370a3384dd01bdb0e31816588a1fa74962c5ce.zip
gdb-51370a3384dd01bdb0e31816588a1fa74962c5ce.tar.gz
gdb-51370a3384dd01bdb0e31816588a1fa74962c5ce.tar.bz2
gdb/
* arm-tdep.c (arm_get_next_pc_raw): Use read_memory_unsigned_integer to get address.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/arm-tdep.c21
2 files changed, 15 insertions, 11 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index db214d2..1458bbc 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2011-10-11 Yao Qi <yao@codesourcery.com>
+
+ * arm-tdep.c (arm_get_next_pc_raw): Use read_memory_unsigned_integer
+ to get address.
+
2011-10-10 Doug Evans <dje@google.com>
* linux-thread-db.c (thread_db_new_objfile): Only try to load
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 278e6e9..add6be8 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;