From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17702 invoked by alias); 14 Nov 2008 17:40:49 -0000 Received: (qmail 17656 invoked by uid 22791); 14 Nov 2008 17:40:48 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 14 Nov 2008 17:40:13 +0000 Received: from mailhost5.vmware.com (mailhost5.vmware.com [10.16.68.131]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id C77F736012; Fri, 14 Nov 2008 09:40:10 -0800 (PST) Received: from [10.20.92.59] (promb-2s-dhcp59.eng.vmware.com [10.20.92.59]) by mailhost5.vmware.com (Postfix) with ESMTP id B5F19DC05D; Fri, 14 Nov 2008 09:40:10 -0800 (PST) Message-ID: <491DB7E3.9080603@vmware.com> Date: Fri, 14 Nov 2008 19:44:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: Vladimir Prus CC: Joel Brobecker , "gdb-patches@sources.redhat.com" Subject: Re: [RFC] Implement -list-thread-groups. References: <200811122333.29218.vladimir@codesourcery.com> <20081114015217.GD12802@adacore.com> <200811142028.43561.vladimir@codesourcery.com> In-Reply-To: <200811142028.43561.vladimir@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2008-11/txt/msg00358.txt.bz2 > diff --git a/gdb/thread.c b/gdb/thread.c > index b1e318d..a32dff4 100644 > --- a/gdb/thread.c > +++ b/gdb/thread.c > @@ -636,9 +636,10 @@ set_stop_requested (ptid_t ptid, int stop) > use from MI. > If REQUESTED_THREAD is not -1, it's the GDB id of the thread > that should be printed. Otherwise, all threads are > - printed. */ > + printed. > + If PID is not -1, only prints threads from the process PID. */ For completeness and consistency, how about adding "Otherwise, threads from all attached PIDs are printed." > void > -print_thread_info (struct ui_out *uiout, int requested_thread) > +print_thread_info (struct ui_out *uiout, int requested_thread, int pid) > { > struct thread_info *tp; > ptid_t current_ptid; > @@ -646,6 +647,8 @@ print_thread_info (struct ui_out *uiout, int requested_thread) > char *extra_info; > int current_thread = -1; > > + gdb_assert (requested_thead == -1 || pid == -1); I'm puzzled by this assert. You don't think we'll ever want to specify both the pid and the thread? Otherwise, these changes to thread.c seem fine.