GNU Binutils with patches for OS216
修订版 | 5d971d48b922afc1cfe3ba1798477473cfbd052e (tree) |
---|---|
时间 | 2020-06-19 07:14:40 |
作者 | Pedro Alves <palves@redh...> |
Commiter | Pedro Alves |
Don't write to inferior_ptid in bsd-kvm.c
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.
@@ -1,5 +1,10 @@ | ||
1 | 1 | 2020-06-18 Pedro Alves <palves@redhat.com> |
2 | 2 | |
3 | + * bsd-kvm.c (bsd_kvm_target_open): Switch to thread after adding | |
4 | + it, instead of writing to inferior_ptid. | |
5 | + | |
6 | +2020-06-18 Pedro Alves <palves@redhat.com> | |
7 | + | |
3 | 8 | * btrace.c (btrace_fetch): Use switch_to_thread instead of writing |
4 | 9 | to inferior_ptid. |
5 | 10 |
@@ -136,8 +136,8 @@ bsd_kvm_target_open (const char *arg, int from_tty) | ||
136 | 136 | core_kd = temp_kd; |
137 | 137 | push_target (&bsd_kvm_ops); |
138 | 138 | |
139 | - add_thread_silent (&bsd_kvm_ops, bsd_kvm_ptid); | |
140 | - inferior_ptid = bsd_kvm_ptid; | |
139 | + thread_info *thr = add_thread_silent (&bsd_kvm_ops, bsd_kvm_ptid); | |
140 | + switch_to_thread (thr); | |
141 | 141 | |
142 | 142 | target_fetch_registers (get_current_regcache (), -1); |
143 | 143 |