From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id KaUxCZ7Q5mfIrx0AWB0awg (envelope-from ) for ; Fri, 28 Mar 2025 12:38:54 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=MR1TM3iv; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 167EE1E0C3; Fri, 28 Mar 2025 12:38:54 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 7D5C31E0C0 for ; Fri, 28 Mar 2025 12:38:53 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1FF533830608 for ; Fri, 28 Mar 2025 16:38:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1FF533830608 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=MR1TM3iv Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 665463857BA5 for ; Fri, 28 Mar 2025 16:38:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 665463857BA5 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 665463857BA5 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1743179901; cv=none; b=OiWsyo+9L/q/lVUspSeYzUPeprEET4nlbcdZolJWIS+PIxM34Eu6IrWWfcmXpvCZ07gQc4/TqRgJu8YSeqrktCp6prQWpGExBOCkJlrS14d/NaFXlI5lqzgR0IdwIdA4uRG38FXYmB51EWe3VjoFHFoZl1NTwlFE99Duzu6jMs0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1743179901; c=relaxed/simple; bh=PNgzfEpCxvPoCwUDzVX3vecwfi66v7JPQQvCVr9rdk4=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=uLAbb3yM/th250KboEYwtLksoSZqrEEWSUyg8aGGWbiKKb71mDVjDWwpwlT2h20wTFtycchGoHqopywZHkXAOSG++PL6oEbPVWAhCfX7Vslt/o5gRxdCKnYF5wD/Pcgu8LyxPh2n6UsGNNwX3AjldGQJuAH/hc2URzC8VwdQxiM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 665463857BA5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743179901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZANIP0amNz+nhYCRLlw4AFzzfKKKO15+nrMUFqO6ePA=; b=MR1TM3ivFnTeNeD3Sej/B2sbU6y7FYHLxVq3JKtLUCdfvvSPp7aeK4+urjxtSUpK62ECgg t9DNcozVe4l3uQL3WknrOuEbpCHOmIzh7pQCWbje3RNy5dAZVChqhak7GV1HqceuGyKbl0 zojy8hDzg+53U9cV0zXuYKLlUsJxec8= Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-496-JZyKG5WsOaiAF5KqGxzqLg-1; Fri, 28 Mar 2025 12:38:17 -0400 X-MC-Unique: JZyKG5WsOaiAF5KqGxzqLg-1 X-Mimecast-MFC-AGG-ID: JZyKG5WsOaiAF5KqGxzqLg_1743179896 Received: by mail-pl1-f198.google.com with SMTP id d9443c01a7336-2242ce15cc3so46247175ad.1 for ; Fri, 28 Mar 2025 09:38:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743179896; x=1743784696; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZANIP0amNz+nhYCRLlw4AFzzfKKKO15+nrMUFqO6ePA=; b=cY6SMHxz0I8uo57SdxxP0m9/qb7T1B8EGYkNJwvrfAqU+ZDulC5NGL91R2+xe6U0pn X/M57uHFO6BoDya36nQDwq/jzZKdpWEJdj6ErWa7U+pJbak6LDj/8kbYo3bPCu4O55bw XMXfbbG2Xslty0EzGygiw4rlqPmCioHvuK08Jc8qnoqaSRHJYpLgL1R54A2C0exWZpIw 2C+dJY8YiNiFijqjzsfEVAcplf4GSe6P1AlXDOX8wuIr1OJ+xMdJr3qrgrWOaj+UlTX9 VYu6DI1UjEAFBqS7kmgXgHGc9ct1fY0Ljo3V7O8EVYxC9fZtEeKhQYcEz0fkWkr++Xdp LqFQ== X-Forwarded-Encrypted: i=1; AJvYcCXC1kUquDq+vJqhx4slDoQksXi/FMSyPlSx1Pm+rHO+0OIg20oZzZ3dCCzjOTSQRmrBILm+Om1bu0oqEA==@sourceware.org X-Gm-Message-State: AOJu0Yxf1VebcOzTA3mLjVCzlj3rdiK73fJaYRBvq0slriERrJY1nPao v5WT19NYW55zSNyOidbgquISHowI0bm+2qD1Js0z+trsUcFRJJAEyjRW7tVjcA1/VKJ1BcztwRg LnJYZ2SBznFPvNrnDBcpU6fokOsVAOYgZRjc7GfuwylPyfgPST0DAXCDDoMQpPIFC/k8= X-Gm-Gg: ASbGncsm3M4zVSmTMqfS7tWcwOgjLjaif1jiGfVcvGlyETPnIbhwEQhFOCNboAFZ+l0 3PKVmy72BrHpjbi4Er14yUy975lF2tXWstofvNxrxZ02rE9/f3+jFx9x1XQL+4S5+L1DoWqsnkF y3cTZbbMKuJCNAgX9kwkujruQpUaD/xp13XttMa35RM7n+JWxKSWWM5ePq219HtFinVNfzQIuIA ZO3pgJ7yP1214av1BSvye/pcwg0gE/jJwDg7lVnvqxI88hMYkKbsGPzfmP/AcSrbxLImiVCGOs4 4nMsi0FUfklJraBsiu2xFHklx6Y= X-Received: by 2002:a17:902:ce0f:b0:223:39ae:a98 with SMTP id d9443c01a7336-22804877c53mr134124215ad.22.1743179895600; Fri, 28 Mar 2025 09:38:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGdvzIMqomsiBXwdG0St3LiA7EeZ3oqhCBl798wPAFdlfE1RV7bqNJh15MWctLjt5vrCvL1CQ== X-Received: by 2002:a17:902:ce0f:b0:223:39ae:a98 with SMTP id d9443c01a7336-22804877c53mr134123795ad.22.1743179895095; Fri, 28 Mar 2025 09:38:15 -0700 (PDT) Received: from ?IPV6:2804:14d:8084:9a69::1001? ([2804:14d:8084:9a69::1001]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2291eee50f6sm20707815ad.101.2025.03.28.09.38.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 28 Mar 2025 09:38:14 -0700 (PDT) Message-ID: <943e07a2-2615-410a-881d-ce3125ef81b5@redhat.com> Date: Fri, 28 Mar 2025 13:38:12 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 0/2] Option to show stopped threads only To: Tankut Baris Aktemur , gdb-patches@sourceware.org References: From: Guinevere Larsen In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: DNnOIf_bkxLYp9LQKCmixgOQQ77OMayP37j0WFv3Izc_1743179896 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org 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 -- 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 >