Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@efficios.com>
To: Matthieu Longo <matthieu.longo@arm.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 09:46:09 -0400	[thread overview]
Message-ID: <6d7f4675-7bfa-4623-8fc2-75e807db837a@efficios.com> (raw)
In-Reply-To: <9757b279-c202-49b6-a83f-331e27db23b4@arm.com>

On 9/21/26 6:22 AM, Matthieu Longo wrote:
> 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

It's a Gerrit change id, added by the Gerrit hook.  That's because I use
Gerrit to track patches when I develop them.  Having the Change-Id in
the upstream commits makes it so that Gerrit auto-closes the changes
when I pull origin/master into Gerrit's master branch, so it helps me
with tracking what I have pending.

Simon

  reply	other threads:[~2026-09-21 13:46 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 ` [PATCH 1/2] gdb: don't return an exited thread from any_non_exited_thread_of_inferior Matthieu Longo
2026-09-21 13:46   ` Simon Marchi [this message]
     [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=6d7f4675-7bfa-4623-8fc2-75e807db837a@efficios.com \
    --to=simon.marchi@efficios.com \
    --cc=gdb-patches@sourceware.org \
    --cc=matthieu.longo@arm.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