Don't write to inferior_ptid in bsd-kvm.c
authorPedro Alves <palves@redhat.com>
Thu, 18 Jun 2020 20:28:30 +0000 (21:28 +0100)
committerPedro Alves <palves@redhat.com>
Thu, 18 Jun 2020 22:13:47 +0000 (23:13 +0100)
gdb/ChangeLog:
2020-06-18  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/ChangeLog
gdb/bsd-kvm.c

index 96335cb0a7d9cf02c6b15954b159831486f2f1b1..c465a4d36d53462c8ff00d7e8f3024b7269b9cff 100644 (file)
@@ -1,3 +1,8 @@
+2020-06-18  Pedro Alves  <palves@redhat.com>
+
+       * bsd-kvm.c (bsd_kvm_target::close): Use switch_to_no_thread
+       instead of writing to inferior_ptid directly.
+
 2020-06-18  Pedro Alves  <palves@redhat.com>
 
        * corelow.c (core_target::close): Use switch_to_no_thread instead
index b1b1fee5f4f4e8203ff88102e2f6dc37d33e1845..f35c85a2ea8d73e951e169108383dc96b24594d7 100644 (file)
@@ -155,7 +155,7 @@ bsd_kvm_target::close ()
       core_kd = NULL;
     }
 
-  inferior_ptid = null_ptid;
+  switch_to_no_thread ();
   exit_inferior_silent (current_inferior ());
 }