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.
+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
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);