Introduce typeid_operation
[deliverable/binutils-gdb.git] / gdb / bsd-kvm.c
index 28e6fcfa14415187e0d57e99c81a2b3f3ea11a7b..cd25e19a544e08d2058c7ec8bcd06aeefec7a6e4 100644 (file)
@@ -1,6 +1,6 @@
 /* BSD Kernel Data Access Library (libkvm) interface.
 
-   Copyright (C) 2004-2020 Free Software Foundation, Inc.
+   Copyright (C) 2004-2021 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -136,8 +136,8 @@ bsd_kvm_target_open (const char *arg, int from_tty)
   core_kd = temp_kd;
   push_target (&bsd_kvm_ops);
 
-  add_thread_silent (bsd_kvm_ptid);
-  inferior_ptid = bsd_kvm_ptid;
+  thread_info *thr = add_thread_silent (&bsd_kvm_ops, bsd_kvm_ptid);
+  switch_to_thread (thr);
 
   target_fetch_registers (get_current_regcache (), -1);
 
@@ -155,8 +155,8 @@ bsd_kvm_target::close ()
       core_kd = NULL;
     }
 
-  inferior_ptid = null_ptid;
-  discard_all_inferiors ();
+  switch_to_no_thread ();
+  exit_inferior_silent (current_inferior ());
 }
 
 static LONGEST
This page took 0.025387 seconds and 4 git commands to generate.