From f2e1c129f8f0985ec80e6cf775cf3e4afbced6fa Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Thu, 18 Jun 2020 21:28:30 +0100 Subject: [PATCH] Don't write to inferior_ptid in bsd-kvm.c gdb/ChangeLog: 2020-06-18 Pedro Alves * bsd-kvm.c (bsd_kvm_target::close): Use switch_to_no_thread instead of writing to inferior_ptid directly. --- gdb/ChangeLog | 5 +++++ gdb/bsd-kvm.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 96335cb0a7d..c465a4d36d5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-06-18 Pedro Alves + + * bsd-kvm.c (bsd_kvm_target::close): Use switch_to_no_thread + instead of writing to inferior_ptid directly. + 2020-06-18 Pedro Alves * corelow.c (core_target::close): Use switch_to_no_thread instead diff --git a/gdb/bsd-kvm.c b/gdb/bsd-kvm.c index b1b1fee5f4f..f35c85a2ea8 100644 --- a/gdb/bsd-kvm.c +++ b/gdb/bsd-kvm.c @@ -155,7 +155,7 @@ bsd_kvm_target::close () core_kd = NULL; } - inferior_ptid = null_ptid; + switch_to_no_thread (); exit_inferior_silent (current_inferior ()); } -- 2.30.2