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 2792208..2fe8ab1 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
+ * infrun.c (handle_inferior_event_1): When exec'ing, read
+ stop_pc after follow_exec.
+
+2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
+
* remote.c (process_g_packet): Update error message.
2017-09-05 Yao Qi <yao.qi@linaro.org>
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 7568a5e..1c6b186 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -5309,8 +5309,6 @@ Cannot fill $_exitsignal with the correct signal number.\n"));
if (!ptid_equal (ecs->ptid, inferior_ptid))
context_switch (ecs->ptid);
- stop_pc = regcache_read_pc (get_thread_regcache (ecs->ptid));
-
/* Do whatever is necessary to the parent branch of the vfork. */
handle_vfork_child_exec_or_exit (1);
@@ -5319,6 +5317,8 @@ 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->ptid));
+
/* 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). */