From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14291 invoked by alias); 19 Sep 2011 17:26:58 -0000 Received: (qmail 14261 invoked by uid 22791); 19 Sep 2011 17:26:57 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from lvk-gate.cmc.msu.ru (HELO mail.lvk.cs.msu.su) (212.192.248.233) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 19 Sep 2011 17:26:36 +0000 Received: from mail.lvk.cs.msu.su (localhost [127.0.0.1]) by mail.lvk.cs.msu.su (Postfix) with ESMTP id 3A2691668; Mon, 19 Sep 2011 21:26:30 +0400 (MSD) X-Spam-ASN: Received: from thunder.localnet (h86-62-88-129.ln.rinet.ru [86.62.88.129]) by mail.lvk.cs.msu.su (Postfix) with ESMTPSA id 1DF5ADC0; Mon, 19 Sep 2011 21:26:30 +0400 (MSD) From: Vladimir Prus To: Joel Brobecker Subject: Re: [RFA 1/3] [Ada] New GDB/MI command: -ada-tasks-info Date: Mon, 19 Sep 2011 17:52:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-11-generic-pae; KDE/4.6.2; i686; ; ) Cc: gdb-patches@sourceware.org References: <1316205921-18702-1-git-send-email-brobecker@adacore.com> <1316205921-18702-2-git-send-email-brobecker@adacore.com> In-Reply-To: <1316205921-18702-2-git-send-email-brobecker@adacore.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Message-Id: <201109192126.26235.vladimir@codesourcery.com> X-AV-Checked: ClamAV using ClamSMTP 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-09/txt/msg00362.txt.bz2 On Saturday, September 17, 2011 00:45:19 Joel Brobecker wrote: > This patch introduces a new GDB/MI command: -ada-tasks-info, > which is meant to be the MI equivalent of the CLI `info tasks' > command. > > This new command returns an array, with each row corresponding > to one task. For now, the columns of the array corresponds to > the columns displayed in the CLI output. > > gdb/ChangeLog: > > * ada-lang.h (struct inferior): Declare. > (print_ada_task_info): Add declaration. > * ada-tasks.c (print_ada_task_info): Make non-static. > * mi/mi-cmds.c (mi_cmds): Add "ada-task-info". > * mi/mi-cmds.h (mi_cmd_ada_task_info): Add declaration. > * mi/mi-main.c: #include "ada-lang.h". > (mi_cmd_list_features): Add "ada-task-info" to the list > of supported features. > (mi_cmd_ada_task_info): New function. Hi Joel, I don't have any questions about the implementation, but I do wonder whether reusing "info os xxx" mechanism might be better here, e.g.: info os ada-tasks and a matching MI command. Oops, it appears we never submitted the matching MI command, but that's a one line patch anyway, below. I don't have the slighest clue whether "info os" mechanism is a good match here; I'm speaking purely from extensible interface point of view. Thanks, -- Vladimir Prus CodeSourcery / Mentor Graphics +7 (812) 677-68-40 Index: gdb/mi/mi-cmds.c =================================================================== --- gdb/mi/mi-cmds.c (revision 305439) +++ gdb/mi/mi-cmds.c (revision 305440) @@ -84,6 +84,7 @@ { "gdb-version", { "show version", 0 }, 0 }, { "inferior-tty-set", { NULL, 0 }, mi_cmd_inferior_tty_set}, { "inferior-tty-show", { NULL, 0 }, mi_cmd_inferior_tty_show}, + { "info-os", { "info os", 1 }, NULL }, { "interpreter-exec", { NULL, 0 }, mi_cmd_interpreter_exec}, { "list-features", { NULL, 0 }, mi_cmd_list_features}, { "list-target-features", { NULL, 0 }, mi_cmd_list_target_features},