[18/28] Don't write to inferior_ptid in bsd-kvm.c

Message ID 20200414175434.8047-19-palves@redhat.com
State New
Headers show
Series
  • Decouple inferior_ptid/inferior_thread(); dup ptids in thread list (PR/25412)
Related show

Commit Message

Simon Marchi via Gdb-patches April 14, 2020, 5:54 p.m.
gdb/ChangeLog:
yyyy-mm-dd  Pedro Alves  <palves@redhat.com>

	* bsd-kvm.c (bsd_kvm_target::close): Use switch_to_no_thread
	instead of writing to inferior_ptid directly.
---
 gdb/bsd-kvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.14.5

Patch

diff --git a/gdb/bsd-kvm.c b/gdb/bsd-kvm.c
index b1b1fee5f4..f35c85a2ea 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 ());
 }