Move deleting thread on TARGET_WAITKIND_THREAD_EXITED to core
authorPedro Alves <pedro@palves.net>
Mon, 5 Dec 2022 20:44:39 +0000 (20:44 +0000)
committerPedro Alves <pedro@palves.net>
Mon, 13 Nov 2023 14:16:10 +0000 (14:16 +0000)
commit7730e5c6c2658658a032a957a78e663350dc5124
tree3437b23810e853b676cbc8c5b3dfc01a1ce49858
parentad320fbf91e6808699cb69cccca7299a2332074d
Move deleting thread on TARGET_WAITKIND_THREAD_EXITED to core

Currently, infrun assumes that when TARGET_WAITKIND_THREAD_EXITED is
reported, the corresponding GDB thread has already been removed from
the GDB thread list.

Later in the series, that will no longer work, as infrun will need to
refer to the thread's thread_info when it processes
TARGET_WAITKIND_THREAD_EXITED.

As preparation, this patch makes deleting the GDB thread
responsibility of infrun, instead of the target.

Reviewed-By: Andrew Burgess <aburgess@redhat.com>
Change-Id: I013d87f61ffc9aaca49f0d6ce2a43e3ea69274de
gdb/infrun.c
gdb/linux-nat.c