X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fbsd-kvm.c;h=d40bfe66e4c201da0d1918e1a59749c80afe41f3;hb=fdd67a422f898e5b0c80ccc1121af438328a9b1a;hp=74c044f6c734f2f2256ff650a633155c3942257c;hpb=d9fa87f4f6e732f5feb41f2fa7dc6faddb1fb627;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/bsd-kvm.c b/gdb/bsd-kvm.c index 74c044f6c7..d40bfe66e4 100644 --- a/gdb/bsd-kvm.c +++ b/gdb/bsd-kvm.c @@ -1,6 +1,6 @@ /* BSD Kernel Data Access Library (libkvm) interface. - Copyright (C) 2004-2019 Free Software Foundation, Inc. + Copyright (C) 2004-2020 Free Software Foundation, Inc. This file is part of GDB. @@ -29,6 +29,7 @@ #include "gdbcore.h" #include "inferior.h" /* for get_exec_file */ #include "gdbthread.h" +#include "gdbsupport/pathstuff.h" #include #include @@ -135,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); @@ -154,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