From: Simon Marchi <simark@simark.ca>
To: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>,
gdb-patches@sourceware.org
Subject: Re: [PATCH v2 3/3] gdb, multi-target: pass a target argument to delete_exited_threads
Date: Mon, 20 Apr 2026 13:20:39 -0400 [thread overview]
Message-ID: <fa334f9c-10bd-4ebd-9865-1c1b20e0bb6a@simark.ca> (raw)
In-Reply-To: <20260420134611.4009838-3-tankut.baris.aktemur@intel.com>
On 4/20/26 9:46 AM, Tankut Baris Aktemur wrote:
> diff --git a/gdb/inferior.c b/gdb/inferior.c
> index e050dec402e..1481f46cdd1 100644
> --- a/gdb/inferior.c
> +++ b/gdb/inferior.c
> @@ -368,7 +368,7 @@ inferior_appeared (struct inferior *inf, int pid)
> {
> /* If this is the first inferior with threads, reset the global
> thread id. */
> - delete_exited_threads ();
> + delete_exited_threads (nullptr);
Not related to your patch, but I'm a bit curious to know why this
delete_exited_threads is not done when we "mourn" the previous existence
of the inferior. In the lifecycle of an inferior, there should always
be a point where an inferior stops "being", before "becoming" a new
execution. At that point, the process target would be known and we
could pass it to delete_exited_threads.
> @@ -2112,7 +2112,7 @@ thread_select (const char *tidstr, thread_info *tp)
>
> /* Since the current thread may have changed, see if there is any
> exited thread we can now delete. */
> - delete_exited_threads ();
> + delete_exited_threads (nullptr);
I don't know if it's worthwhile, but we could restrict this one to the
process target of the previously selected thread.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Simon
next prev parent reply other threads:[~2026-04-20 17:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-20 13:46 [PATCH v2 1/3] gdb: parameterize all_threads_safe for the target and ptid Tankut Baris Aktemur
2026-04-20 13:46 ` [PATCH v2 2/3] gdb, multi-target: pass a target argument to prune_threads Tankut Baris Aktemur
2026-04-20 17:02 ` Simon Marchi
2026-04-20 13:46 ` [PATCH v2 3/3] gdb, multi-target: pass a target argument to delete_exited_threads Tankut Baris Aktemur
2026-04-20 17:20 ` Simon Marchi [this message]
2026-04-21 7:48 ` Aktemur, Tankut Baris
2026-04-20 16:58 ` [PATCH v2 1/3] gdb: parameterize all_threads_safe for the target and ptid Simon Marchi
2026-04-20 17:21 ` Aktemur, Tankut Baris
2026-04-20 17:49 ` 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=fa334f9c-10bd-4ebd-9865-1c1b20e0bb6a@simark.ca \
--to=simark@simark.ca \
--cc=gdb-patches@sourceware.org \
--cc=tankut.baris.aktemur@intel.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