aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 11dcc0e..5770d77 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -1784,6 +1784,10 @@ displaced_step_fixup (ptid_t event_ptid, enum gdb_signal signal)
/* Did the instruction complete successfully? */
if (signal == GDB_SIGNAL_TRAP)
{
+ /* Fixup may need to read memory/registers. Switch to the
+ thread that we're fixing up. */
+ switch_to_thread (event_ptid);
+
/* Fix up the resulting state. */
gdbarch_displaced_step_fixup (displaced->step_gdbarch,
displaced->step_closure,