diff options
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index 4164a00..7870f70 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -98,6 +98,8 @@ static void insert_step_resume_breakpoint_at_caller (struct frame_info *); static void insert_longjmp_resume_breakpoint (struct gdbarch *, CORE_ADDR); +static int maybe_software_singlestep (struct gdbarch *gdbarch, CORE_ADDR pc); + /* When set, stop the 'step' command if we enter a function which has no line number information. The normal behavior is that we step over such function. */ @@ -1863,6 +1865,7 @@ displaced_step_fixup (ptid_t event_ptid, enum gdb_signal signal) regcache = get_thread_regcache (ptid); actual_pc = regcache_read_pc (regcache); aspace = get_regcache_aspace (regcache); + gdbarch = get_regcache_arch (regcache); if (breakpoint_here_p (aspace, actual_pc)) { @@ -1873,8 +1876,6 @@ displaced_step_fixup (ptid_t event_ptid, enum gdb_signal signal) displaced_step_prepare (ptid); - gdbarch = get_regcache_arch (regcache); - if (debug_displaced) { CORE_ADDR actual_pc = regcache_read_pc (regcache); @@ -1907,6 +1908,9 @@ displaced_step_fixup (ptid_t event_ptid, enum gdb_signal signal) /* Go back to what we were trying to do. */ step = currently_stepping (tp); + if (step) + step = maybe_software_singlestep (gdbarch, actual_pc); + if (debug_displaced) fprintf_unfiltered (gdb_stdlog, "displaced: breakpoint is gone: %s, step(%d)\n", |