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

Pedro Alves
2020-04-14T17:54:52Z

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(-)

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 ());
}

--
2.14.5