2012-04-13 Luis Machado <lgustavo@codesourcery.com>
authorLuis Machado <luisgpm@br.ibm.com>
Fri, 13 Apr 2012 20:46:42 +0000 (20:46 +0000)
committerLuis Machado <luisgpm@br.ibm.com>
Fri, 13 Apr 2012 20:46:42 +0000 (20:46 +0000)
* infrun.c (resume): Update PC address to the real PC after
preparing to do displaced stepping.

gdb/ChangeLog
gdb/infrun.c

index 0c48bd35a30c8749ac46d4cfb5676ea9e5e25b2b..890131cb5021bc990e65f334cd59552979e735d1 100644 (file)
@@ -1,3 +1,8 @@
+2012-04-13  Luis Machado  <lgustavo@codesourcery.com>
+
+       * infrun.c (resume): Update PC address to the real PC after
+       preparing to do displaced stepping.
+
 2012-04-12  Doug Evans  <dje@google.com>
 
        * dwarf2read.c (lookup_signatured_type): Remove arg "objfile", unused.
index 62f67c930138d23ef2be8a77478ab2079bbb8edc..a7d6c3c2bb2b8c1c46bd85af9483bb862fbee01c 100644 (file)
@@ -1789,6 +1789,10 @@ a command like `return' or `jump' to continue execution."));
          return;
        }
 
+      /* Update pc to reflect the new address from which we will execute
+        instructions due to displaced stepping.  */
+      pc = regcache_read_pc (get_thread_regcache (inferior_ptid));
+
       displaced = get_displaced_stepping_state (ptid_get_pid (inferior_ptid));
       step = gdbarch_displaced_step_hw_singlestep (gdbarch,
                                                   displaced->step_closure);