From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22053 invoked by alias); 16 Feb 2011 11:48:52 -0000 Received: (qmail 22044 invoked by uid 22791); 16 Feb 2011 11:48:51 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 Feb 2011 11:48:42 +0000 Received: (qmail 874 invoked from network); 16 Feb 2011 11:48:40 -0000 Received: from unknown (HELO scottsdale.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 16 Feb 2011 11:48:40 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [RFC] info threads takes an argument Date: Wed, 16 Feb 2011 11:58:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.35-25-generic; KDE/4.6.0; x86_64; ; ) Cc: Michael Snyder , Tom Tromey References: <4D54964A.2070401@vmware.com> <4D5AEDA7.1000405@vmware.com> In-Reply-To: <4D5AEDA7.1000405@vmware.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201102161148.36948.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-02/txt/msg00363.txt.bz2 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: 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: 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. -- Pedro Alves