From a0776b131d7a154125fdc4d22b1dda967c790ae9 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Thu, 18 Jun 2020 21:28:20 +0100 Subject: [PATCH] Don't write to inferior_ptid in target.c gdb/ChangeLog: 2020-06-18 Pedro Alves * target.c (generic_mourn_inferior): Use switch_to_no_thread instead of writing to inferior_ptid. --- gdb/ChangeLog | 5 +++++ gdb/target.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4bc9c2818bd..2890b1f662a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-06-18 Pedro Alves + + * target.c (generic_mourn_inferior): Use switch_to_no_thread + instead of writing to inferior_ptid. + 2020-06-18 Pedro Alves * inf-ptrace.c (inf_ptrace_target::create_inferior): Switch to the diff --git a/gdb/target.c b/gdb/target.c index e8193b49fa0..f4e4f05b5fa 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -3108,7 +3108,7 @@ generic_mourn_inferior (void) { inferior *inf = current_inferior (); - inferior_ptid = null_ptid; + switch_to_no_thread (); /* Mark breakpoints uninserted in case something tries to delete a breakpoint while we delete the inferior's threads (which would -- 2.30.2