Don't write to inferior_ptid in gnu-nat.c
authorPedro Alves <palves@redhat.com>
Thu, 18 Jun 2020 20:28:28 +0000 (21:28 +0100)
committerPedro Alves <palves@redhat.com>
Thu, 18 Jun 2020 22:11:23 +0000 (23:11 +0100)
commit975f8708de015fb2b813edbf8b714f4777c57a41
treeb8ce29a14c6aa23f7c87d4743c7ff134b50b954f
parent1a20473059c7a088b9f3c4188c09976eebbc3ab4
Don't write to inferior_ptid in gnu-nat.c

Untested.

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

* gnu-nat.c (gnu_nat_target::create_inferior): Switch to the added
thread.
(gnu_nat_target::attach): Don't write to inferior_ptid directly.
Instead use switch_to_thread.
(gnu_nat_target::detach): Use switch_to_no_thread
instead of writing to inferior_ptid directly.  Used passed-in
inferior instead of looking up the inferior by pid.
gdb/ChangeLog
gdb/gnu-nat.c
This page took 0.025646 seconds and 4 git commands to generate.