summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/infcmd.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d348abbf585..cd89a44733a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2020-01-15 Simon Marchi <simon.marchi@efficios.com>
+
+ * infcmd.c (post_create_inferior): Use get_thread_regcache
+ instead of get_current_regcache.
+
2020-01-14 Tom Tromey <tom@tromey.com>
PR symtab/12535:
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index cf8b312f9db..3e7c43fab52 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -441,7 +441,8 @@ post_create_inferior (struct target_ops *target, int from_tty)
thr->suspend.stop_pc = 0;
try
{
- thr->suspend.stop_pc = regcache_read_pc (get_current_regcache ());
+ regcache *rc = get_thread_regcache (thr);
+ thr->suspend.stop_pc = regcache_read_pc (rc);
}
catch (const gdb_exception_error &ex)
{