Don't write to inferior_ptid in remote.c
authorPedro Alves <palves@redhat.com>
Thu, 18 Jun 2020 20:28:24 +0000 (21:28 +0100)
committerPedro Alves <palves@redhat.com>
Thu, 18 Jun 2020 22:08:14 +0000 (23:08 +0100)
commit0ac553107c601cc9c4c340338e0fc7e0ce8375cc
tree88f159eaad394c47aecc79314be75eb4fdb136aa
parent5233f39b8b999f2675fb9493149e878c281e1d60
Don't write to inferior_ptid in remote.c

gdb/ChangeLog:
2020-06-18  Pedro Alves  <palves@redhat.com>

* remote.c (remote_target::remote_notice_new_inferior): Use
switch_to_thread instead of writing to inferior_ptid directly.
(remote_target::add_current_inferior_and_thread): Use
switch_to_no_thread instead of writing to inferior_ptid directly.
(extended_remote_target::attach): Use switch_to_inferior_no_thread
and switch_to_thread instead of using set_current_inferior or
writing to inferior_ptid directly.
gdb/ChangeLog
gdb/remote.c