Don't write to inferior_ptid in bsd-kvm.c
authorPedro Alves <palves@redhat.com>
Thu, 18 Jun 2020 20:28:32 +0000 (21:28 +0100)
committerPedro Alves <palves@redhat.com>
Thu, 18 Jun 2020 22:14:40 +0000 (23:14 +0100)
gdb/ChangeLog:
2020-06-18  Pedro Alves  <palves@redhat.com>

* bsd-kvm.c (bsd_kvm_target_open): Switch to thread after adding
it, instead of writing to inferior_ptid.

gdb/ChangeLog
gdb/bsd-kvm.c

index 2f3c1e5887488866dee543dacc5b808e24f02d0c..606ac65d9ced1148e34d38fe3268b8c6613b3bb9 100644 (file)
@@ -1,3 +1,8 @@
+2020-06-18  Pedro Alves  <palves@redhat.com>
+
+       * bsd-kvm.c (bsd_kvm_target_open): Switch to thread after adding
+       it, instead of writing to inferior_ptid.
+
 2020-06-18  Pedro Alves  <palves@redhat.com>
 
        * btrace.c (btrace_fetch): Use switch_to_thread instead of writing
index f35c85a2ea8d73e951e169108383dc96b24594d7..d40bfe66e4c201da0d1918e1a59749c80afe41f3 100644 (file)
@@ -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_ops, 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);
 
This page took 0.029051 seconds and 4 git commands to generate.