gdb/
authorYao Qi <yao@codesourcery.com>
Tue, 11 Oct 2011 07:31:29 +0000 (07:31 +0000)
committerYao Qi <yao@codesourcery.com>
Tue, 11 Oct 2011 07:31:29 +0000 (07:31 +0000)
* arm-tdep.c (arm_get_next_pc_raw): Use read_memory_unsigned_integer
to get address.

gdb/ChangeLog
gdb/arm-tdep.c

index db214d2d2d76df40b4bc8109a2f7fa8de94c433a..1458bbcd14d5973262eecf1b13b5165ccf3b0d99 100644 (file)
@@ -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
index 278e6e940911bdc6c2d387d099ec09e219ad3a44..add6be871d729f72af920267cd94691784b56e72 100644 (file)
@@ -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;