From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7359 invoked by alias); 16 Feb 2011 18:26:43 -0000 Received: (qmail 7349 invoked by uid 22791); 16 Feb 2011 18:26:43 -0000 X-SWARE-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD 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.43rc1) with ESMTP; Wed, 16 Feb 2011 18:26:35 +0000 Received: from mailhost4.vmware.com (mailhost4.vmware.com [10.16.67.124]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 435A31A00C; Wed, 16 Feb 2011 10:26:34 -0800 (PST) Received: from msnyder-server.eng.vmware.com (promd-2s-dhcp138.eng.vmware.com [10.20.124.138]) by mailhost4.vmware.com (Postfix) with ESMTP id 14D96C9E98; Wed, 16 Feb 2011 10:26:34 -0800 (PST) Message-ID: <4D5C16D9.9030204@vmware.com> Date: Wed, 16 Feb 2011 18:47:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.24 (X11/20101201) MIME-Version: 1.0 To: Pedro Alves CC: "gdb-patches@sourceware.org" , Tom Tromey Subject: Re: [RFC] info threads takes an argument References: <4D54964A.2070401@vmware.com> <4D5AEDA7.1000405@vmware.com> <201102161148.36948.pedro@codesourcery.com> In-Reply-To: <201102161148.36948.pedro@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-15; 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: 2011-02/txt/msg00380.txt.bz2 Pedro Alves wrote: > On Tuesday 15 February 2011 21:18:31, Michael Snyder wrote: >> find.txt >> 2011-02-15 Michael Snyder >> >> * command.h (enum command_class): New class 'no_set_class', for >> "show" commands without a corresponding "set" command. >> * value.c (_initialize_values): Use 'no_set_class' for "show values". >> * copying.c (_initialize_copying): Ditto for "show copying" and >> "show warranty". >> * cli/cli-cmds.c (init_cli_cmds): Ditto for "show commands" and >> "show version". >> * cli/cli-setshow.c (cmd_show_list): Skip "show" commands for >> which there is no corresponding "set" command (eg. "show copying"). > > Wrong changelog entry, btw. Here's the correct one, to ease > code archaeology / web search in the future: Sorry, fixed. > > 2011-02-15 Michael Snyder > > * thread.c (info_threads_command): Process arg as thread id, > or list of thread ids. > (thread_find_command): New command. > (_initialize_thread): Document argument for info threads. > Document 'thread find' command. > * NEWS: Document new command "thread find". > >> Index: NEWS >> =================================================================== >> RCS file: /cvs/src/src/gdb/NEWS,v >> retrieving revision 1.425 >> diff -u -p -u -p -r1.425 NEWS >> --- NEWS 5 Feb 2011 05:27:23 -0000 1.425 >> +++ NEWS 15 Feb 2011 21:14:27 -0000 >> @@ -3,6 +3,10 @@ >> >> *** Changes since GDB 7.2 >> >> +* GDB has a new command: "thread find [REGEXP]". >> + It finds the thread id whose name, target id, or thread extra info >> + matches the given regular expression. > > IMO, it'd be nice to mention the "info threads" change as well. > > Anyway, the reason I'm replying is that I noticed a couple > of new FAILs in this test, and looking at the log, I noticed > another issue: Urk. I did half my work on the 7.2 branch, where it doesn't do this. Let me fix it. > info threads 2 4 6 > Id Target Id Frame > 2 Thread 0x2aaaab6f4700 (LWP 335) "threadname_2" 0x00002aaaab24e2c3 in select () from /lib/libc.so.6 > Id Target Id Frame > 4 Thread 0x2aaaabaf7700 (LWP 337) "threadname_4" 0x00002aaaab24e2c3 in select () from /lib/libc.so.6 > Id Target Id Frame > 6 Thread 0x2aaaabef9700 (LWP 339) "threadname_6" 0x00002aaaab1f7050 in strchrnul () from /lib/libc.so.6 > (gdb) FAIL: gdb.threads/thread-find.exp: info threads 2 4 6 > info threads 3-5 > Id Target Id Frame > 3 Thread 0x2aaaab8f5700 (LWP 336) "threadname_3" 0x00002aaaab24e2c3 in select () from /lib/libc.so.6 > Id Target Id Frame > 4 Thread 0x2aaaabaf7700 (LWP 337) "threadname_4" 0x00002aaaab24e2c3 in select () from /lib/libc.so.6 > Id Target Id Frame > 5 Thread 0x2aaaabcf8700 (LWP 338) "threadname_5" 0x00002aaaab24e2c3 in select () from /lib/libc.so.6 > (gdb) FAIL: gdb.threads/thread-find.exp: info threads 3-5 > > The header is printed once for each entry. Was that > intended? It doesn't seem right to me. >