Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Matthieu Longo <matthieu.longo@arm.com>
To: Simon Marchi <simon.marchi@efficios.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH 1/2] gdb: don't return an exited thread from any_non_exited_thread_of_inferior
Date: Mon, 21 Sep 2026 11:22:53 +0100	[thread overview]
Message-ID: <9757b279-c202-49b6-a83f-331e27db23b4@arm.com> (raw)
In-Reply-To: <20260917201755.589524-1-simon.marchi@efficios.com>

On 17/09/2026 21:16, Simon Marchi wrote:
> any_non_exited_thread_of_inferior prefers to return the selected thread:
> 
>   /* Prefer the current thread, if there's one.  */
>   if (inf == current_inferior () && inferior_ptid != null_ptid)
>     return inferior_thread ();
> 
> ... but the selected thread can be an exited thread.  This can happen in
> non-stop when the selected thread exits, in which case it is kept around
> but marked as exited (see thread_info::deletable).
> 
> Check the current thread's state before returning it, and fall through
> to the existing loop otherwise.
> 
> Note that we also have any_live_thread_of_inferior, which is similar but
> differs in subtle ways.  We should probably check if we can merge them
> at some point.
> 
> Change-Id: I620ee200037c6a3fd3d59b96f16750d6b962c724

For my curiosity, what is this Change-Id for ?
I saw several ones in the git history, but I have no idea why it is there.

Matthieu

  parent reply	other threads:[~2026-09-21 10:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-17 20:16 Simon Marchi
2026-09-17 20:16 ` [PATCH 2/2] gdb: use the selected thread's LWP ID when reading Linux procfs files Simon Marchi
2026-09-21 10:22 ` Matthieu Longo [this message]
2026-09-21 13:46   ` [PATCH 1/2] gdb: don't return an exited thread from any_non_exited_thread_of_inferior Simon Marchi
     [not found] ` <20260917201755.589524-2-simon.marchi@efficios.com_5b6b04a9_release>
2026-09-21 14:26   ` [PATCH 2/2] gdb: use the selected thread's LWP ID when reading Linux procfs files Matthieu Longo
2026-09-21 14:57     ` Simon Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9757b279-c202-49b6-a83f-331e27db23b4@arm.com \
    --to=matthieu.longo@arm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@efficios.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox