Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Guinevere Larsen <guinevere@redhat.com>
To: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>,
	gdb-patches@sourceware.org
Subject: Re: [PATCH v2 0/2] Option to show stopped threads only
Date: Fri, 28 Mar 2025 13:38:12 -0300	[thread overview]
Message-ID: <943e07a2-2615-410a-881d-ce3125ef81b5@redhat.com> (raw)
In-Reply-To: <cover.1742320783.git.tankut.baris.aktemur@intel.com>

On 3/18/25 3:04 PM, Tankut Baris Aktemur wrote:
> Hi,
>
> This is the rebased version of
>
>    https://inbox.sourceware.org/gdb-patches/cover.1680686220.git.tankut.baris.aktemur@intel.com/
>
> As a comment, Eli had expressed his view that when "info threads" is
> given a single thread ID, the "-stopped" flag could be ignored.  I
> didn't implement this yet but can gladly do that if that's the general
> preference.

Hi! Thanks for working on this!

I took a look at your patch, and I think I like how it works at this 
point. Basically, I don't like the idea of ignoring part of the input 
from the user if a different part of the input happens to look a certain 
way (in this case non-empty). Either both options should interact, or 
they should be mutually exclusive, and allowing one to take precedence 
just inserts arbitrary rules that users need to either remember or 
double check the manual every time. However, this is personal 
preference, I'm not married to either idea.

One thing that would be nice, though, would be also testing the behavior 
when a thread ID is given - whatever that behavior is. Adding a couple 
of tests calling one stopped ID, one running ID and multiple IDs, would 
essentially document to ourselves that "this is the behavior we want,it 
isn't an accident" so that if it is changed in the future, it is done so 
on purpose.

As for the patches themselves, they look good to me. I hope this gets 
reviewed soon!

Reviewed-By: Guinevere Larsen <guinevere@redhat.com>

-- 
Cheers,
Guinevere Larsen
She/Her/Hers

>
> Regards,
> Baris
>
> Tankut Baris Aktemur (2):
>    gdb: pass info_threads_opts to print_thread_info_1
>    gdb: add a '-stopped' option to "info threads"
>
>   gdb/NEWS                                      |  7 ++
>   gdb/doc/gdb.texinfo                           |  6 +-
>   gdb/testsuite/gdb.base/options.exp            | 11 ++-
>   .../gdb.threads/info-threads-stopped.c        | 78 +++++++++++++++++
>   .../gdb.threads/info-threads-stopped.exp      | 75 ++++++++++++++++
>   gdb/thread.c                                  | 86 +++++++++++--------
>   6 files changed, 226 insertions(+), 37 deletions(-)
>   create mode 100644 gdb/testsuite/gdb.threads/info-threads-stopped.c
>   create mode 100644 gdb/testsuite/gdb.threads/info-threads-stopped.exp
>


  parent reply	other threads:[~2025-03-28 16:38 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-05  9:19 [PATCH 0/3] " Tankut Baris Aktemur via Gdb-patches
2023-04-05  9:20 ` [PATCH 1/3] gdb: pass info_threads_opts to print_thread_info_1 Tankut Baris Aktemur via Gdb-patches
2023-04-05  9:20 ` [PATCH 2/3] gdb, doc: add the missing '-gid' option to 'info threads' Tankut Baris Aktemur via Gdb-patches
2023-04-05  9:56   ` Eli Zaretskii via Gdb-patches
2023-04-05 10:12     ` Aktemur, Tankut Baris via Gdb-patches
2023-04-05  9:20 ` [PATCH 3/3] gdb: add a '-stopped' option to "info threads" Tankut Baris Aktemur via Gdb-patches
2023-04-05 10:00   ` Eli Zaretskii via Gdb-patches
2023-04-05 10:19     ` Aktemur, Tankut Baris via Gdb-patches
2023-04-05 10:50       ` Eli Zaretskii via Gdb-patches
2023-04-05 11:31         ` Aktemur, Tankut Baris via Gdb-patches
2023-04-05 11:56           ` Eli Zaretskii via Gdb-patches
2025-04-24 14:50           ` Pedro Alves
2025-03-18 18:04 ` [PATCH v2 0/2] Option to show stopped threads only Tankut Baris Aktemur
2025-03-18 18:05   ` [PATCH v2 1/2] gdb: pass info_threads_opts to print_thread_info_1 Tankut Baris Aktemur
2025-03-18 18:05   ` [PATCH v2 2/2] gdb: add a '-stopped' option to "info threads" Tankut Baris Aktemur
2025-03-28 16:38   ` Guinevere Larsen [this message]
2025-04-04 13:39     ` [PATCH v2 0/2] Option to show stopped threads only Aktemur, Tankut Baris
2025-04-04 13:36 ` [PATCH v3 " Tankut Baris Aktemur
2025-04-04 13:36   ` [PATCH v3 1/2] gdb: pass info_threads_opts to print_thread_info_1 Tankut Baris Aktemur
2025-04-24 18:09     ` Pedro Alves
2025-04-04 13:36   ` [PATCH v3 2/2] gdb: add a '-stopped' option to "info threads" Tankut Baris Aktemur
2025-04-24 19:23     ` Pedro Alves
2025-05-05 16:17       ` Aktemur, Tankut Baris
2025-04-23  8:00   ` [PATCH v3 0/2] Option to show stopped threads only Aktemur, Tankut Baris
2025-04-24 17:53   ` Pedro Alves
2025-05-05 16:19   ` [PATCH v4 0/3] Option to show stopped/running " Tankut Baris Aktemur
2025-05-05 16:19     ` [PATCH v4 1/3] gdb: pass info_threads_opts to print_thread_info_1 Tankut Baris Aktemur
2025-05-05 16:19     ` [PATCH v4 2/3] gdb: update "info threads" output when no threads match the arguments Tankut Baris Aktemur
2025-05-05 17:19       ` Eli Zaretskii
2025-05-05 16:19     ` [PATCH v4 3/3] gdb: add '-stopped' and '-running' options to "info threads" Tankut Baris Aktemur
2025-05-05 17:21       ` Eli Zaretskii
2025-05-09 20:54     ` [PATCH v4 0/3] Option to show stopped/running threads only Pedro Alves

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=943e07a2-2615-410a-881d-ce3125ef81b5@redhat.com \
    --to=guinevere@redhat.com \
    --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