From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5232 invoked by alias); 28 Nov 2011 18:56:14 -0000 Received: (qmail 5219 invoked by uid 22791); 28 Nov 2011 18:56:13 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,TW_FC X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 28 Nov 2011 18:56:00 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1RV6Mw-0007F7-By from pedro_alves@mentor.com ; Mon, 28 Nov 2011 10:55:58 -0800 Received: from scottsdale.localnet ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 28 Nov 2011 18:55:56 +0000 From: Pedro Alves To: Eli Zaretskii Subject: Re: [RFC/WIP PATCH 13/14] Make "thread apply all" only loop over threads in the current set Date: Mon, 28 Nov 2011 18:56:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-12-generic; KDE/4.7.2; x86_64; ; ) Cc: gdb-patches@sourceware.org References: <20111128153742.17761.21459.stgit@localhost6.localdomain6> <20111128154009.17761.49348.stgit@localhost6.localdomain6> <831uss6qgh.fsf@gnu.org> In-Reply-To: <831uss6qgh.fsf@gnu.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201111281855.53904.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-11/txt/msg00782.txt.bz2 On Monday 28 November 2011 18:40:14, Eli Zaretskii wrote: > > From: Pedro Alves > > Date: Mon, 28 Nov 2011 15:40:09 +0000 > > > > This makes "thread apply all" only loop over threads in the current > > set instead of always all threads. That is, > > > > [all]> thread apply all printf "current thread is %d\n", $_thread > > > > Thread 3 (Thread 0x7ffff7028700 (LWP 30304)): > > current thread is 3 > > > > Thread 2 (Thread 0x7ffff7829700 (LWP 30303)): > > current thread is 2 > > > > Thread 1 (Thread 0x7ffff7fcb720 (LWP 30300)): > > current thread is 1 > > > > vs > > > > [all]> [1.1] thread apply all printf "current thread is %d\n", $_thread > > > > Thread 1 (Thread 0x7ffff7fcb720 (LWP 30300)): > > current thread is 1 > > > > > > I think it might make sense to make "info threads" only list threads > > of the current focus too. WDYT? > > Shouldn't this be under user control? Or are you sure no one will > ever want to have the former? The idea is that you can always do "(gdb) [all] info threads" (the [all] prefix overrides the current set for the duration of the command) to see all threads. I just realized that if we choose to default to a set that only includes the current inferior instead of defaulting to [all], "info threads" no longer behaves the same as currently, as it'd then only show the threads of the current inferior by default. But then again, that may still be a desirable change anyway. Hmm, choices, choices. -- Pedro Alves