[PATCH v7 3/5] gdb/remote: do not delete a thread if it has a pending exit event
Pedro Alves
palves@redhat.com
Mon May 4 14:43:20 GMT 2020
Tankut,
I'm trying to get back to this, and I would like to apply the whole
series locally, but I'm afraid that I'm having trouble piecing the
series together.
Do you have a public branch where you have all the patches in the series
applied? You could push it under users/ on sourceware.org for example.
Thanks,
Pedro Alves
On 4/22/20 4:00 PM, Tankut Baris Aktemur via Gdb-patches wrote:
> gdb/ChangeLog:
> 2020-04-06 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
>
> * remote.c (remote_target::update_thread_list): Do not delete
> a thread if it has a pending exit event.
> ---
> gdb/remote.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/gdb/remote.c b/gdb/remote.c
> index 5db406e045c..a1fbaa02fb1 100644
> --- a/gdb/remote.c
> +++ b/gdb/remote.c
> @@ -3822,6 +3822,14 @@ remote_target::update_thread_list ()
> if (tp->inf->process_target () != this)
> continue;
>
> + /* Do not remove the thread if it has a pending exit event.
> + Otherwise we may end up with a seemingly live inferior
> + (i.e. pid != 0) that has no threads. */
> + if (tp->suspend.waitstatus_pending_p
> + && (tp->suspend.waitstatus.kind == TARGET_WAITKIND_SIGNALLED
> + || tp->suspend.waitstatus.kind == TARGET_WAITKIND_EXITED))
> + continue;
> +
> if (!context.contains_thread (tp->ptid))
> {
> /* Not found. */
>
More information about the Gdb-patches
mailing list