From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29512 invoked by alias); 8 Mar 2008 15:50:48 -0000 Received: (qmail 29500 invoked by uid 22791); 8 Mar 2008 15:50:47 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 08 Mar 2008 15:50:25 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JY1JU-0008E2-Qp for gdb-patches@sources.redhat.com; Sat, 08 Mar 2008 15:50:20 +0000 Received: from 78.158.192.230 ([78.158.192.230]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 08 Mar 2008 15:50:20 +0000 Received: from ghost by 78.158.192.230 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 08 Mar 2008 15:50:20 +0000 To: gdb-patches@sources.redhat.com From: Vladimir Prus Subject: Re: [RFA] Implement -thread-info. Date: Sat, 08 Mar 2008 15:50:00 -0000 Message-ID: References: <200802171833.26673.vladimir@codesourcery.com> <18371.25340.162317.39030@kahikatea.snap.net.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.10.5 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-03/txt/msg00064.txt.bz2 Nick Roberts wrote: > > --- 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? I think I agree with Dan's concerns about using a backward-compatibility mechanisms. - Volodya