From ca7781d2ae089e04d44ed0b14d946dcb651a3cf8 Mon Sep 17 00:00:00 2001 From: Luis Machado Date: Fri, 13 Apr 2012 20:46:42 +0000 Subject: [PATCH] 2012-04-13 Luis Machado * infrun.c (resume): Update PC address to the real PC after preparing to do displaced stepping. --- gdb/ChangeLog | 5 +++++ gdb/infrun.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0c48bd35a30..890131cb502 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2012-04-13 Luis Machado + + * infrun.c (resume): Update PC address to the real PC after + preparing to do displaced stepping. + 2012-04-12 Doug Evans * dwarf2read.c (lookup_signatured_type): Remove arg "objfile", unused. diff --git a/gdb/infrun.c b/gdb/infrun.c index 62f67c93013..a7d6c3c2bb2 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -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); -- 2.30.2