aboutsummaryrefslogtreecommitdiff
path: root/gdb/bsd-kvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/bsd-kvm.c')
-rw-r--r--gdb/bsd-kvm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/bsd-kvm.c b/gdb/bsd-kvm.c
index f35c85a..d40bfe6 100644
--- a/gdb/bsd-kvm.c
+++ b/gdb/bsd-kvm.c
@@ -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);