aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/infrun.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 81fae49..417c563 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2018-06-28 Pedro Alves <palves@redhat.com>
+
+ * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
+ Moving fetching stop_pc until after ecs->event_thread is refreshed.
+
2018-06-28 Tom Tromey <tom@tromey.com>
* coffread.c (coff_symfile_finish): Update.
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 9548f9c..4c73234 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -5289,13 +5289,13 @@ Cannot fill $_exitsignal with the correct signal number.\n"));
stop. */
follow_exec (inferior_ptid, ecs->ws.value.execd_pathname);
- stop_pc = regcache_read_pc (get_thread_regcache (ecs->event_thread));
-
/* In follow_exec we may have deleted the original thread and
created a new one. Make sure that the event thread is the
execd thread for that case (this is a nop otherwise). */
ecs->event_thread = inferior_thread ();
+ stop_pc = regcache_read_pc (get_thread_regcache (ecs->event_thread));
+
ecs->event_thread->control.stop_bpstat
= bpstat_stop_status (get_current_regcache ()->aspace (),
stop_pc, ecs->event_thread, &ecs->ws);