From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24384 invoked by alias); 26 Feb 2008 00:53:55 -0000 Received: (qmail 24375 invoked by uid 22791); 26 Feb 2008 00:53:53 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 26 Feb 2008 00:53:24 +0000 Received: from kahikatea.snap.net.nz (25.30.255.123.static.snap.net.nz [123.255.30.25]) by viper.snap.net.nz (Postfix) with ESMTP id C766A3D9D71; Tue, 26 Feb 2008 13:53:20 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id 8F32F8FC6D; Tue, 26 Feb 2008 13:53:17 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18371.25340.162317.39030@kahikatea.snap.net.nz> Date: Tue, 26 Feb 2008 00:58:00 -0000 To: Vladimir Prus Cc: gdb-patches@sources.redhat.com, Eli Zaretskii Subject: Re: [RFA] Implement -thread-info. In-Reply-To: <200802201427.36288.vladimir@codesourcery.com> References: <200802171833.26673.vladimir@codesourcery.com> <200802181038.04497.vladimir@codesourcery.com> <18361.64577.771676.184618@kahikatea.snap.net.nz> <200802201427.36288.vladimir@codesourcery.com> X-Mailer: VM 7.19 under Emacs 23.0.60.22 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-02/txt/msg00377.txt.bz2 > --- a/gdb/mi/mi-cmds.c > +++ b/gdb/mi/mi-cmds.c > @@ -130,8 +130,7 @@ struct mi_cmd mi_cmds[] = > { "target-list-current-targets", { NULL, 0 }, NULL, NULL }, > { "target-list-parameters", { NULL, 0 }, NULL, NULL }, > { "target-select", { NULL, 0 }, mi_cmd_target_select}, > - { "thread-info", { NULL, 0 }, NULL, NULL }, > - { "thread-list-all-threads", { NULL, 0 }, NULL, NULL }, > + { "thread-info", { NULL, 0 }, NULL, mi_cmd_thread_info }, > { "thread-list-ids", { NULL, 0 }, 0, mi_cmd_thread_list_ids}, > { "thread-select", { NULL, 0 }, 0, mi_cmd_thread_select}, > { "trace-actions", { NULL, 0 }, NULL, NULL }, I was thinking: *** mi-cmds.c.~1.30.~ 2008-01-04 10:24:35.000000000 +1300 --- mi-cmds.c 2008-02-26 13:47:53.000000000 +1300 *************** struct mi_cmd mi_cmds[] = *** 133,138 **** --- 133,139 ---- { "thread-info", { NULL, 0 }, NULL, NULL }, { "thread-list-all-threads", { NULL, 0 }, NULL, NULL }, { "thread-list-ids", { NULL, 0 }, 0, mi_cmd_thread_list_ids}, + { "thread-info", { "info threads", 0 }, NULL, NULL }, { "thread-select", { NULL, 0 }, 0, mi_cmd_thread_select}, { "trace-actions", { NULL, 0 }, NULL, NULL }, { "trace-delete", { NULL, 0 }, NULL, NULL }, like for "info break". I realise that -thread-info can give info about one thread but presumably the change could allow "info threads" to do that too (just as is already done for "info break"). Then you just need + { "thread-info", { "info threads", 1 }, NULL, NULL }, WDYT? -- Nick http://www.inet.net.nz/~nickrob