Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Vladimir Prus <vladimir@codesourcery.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA 1/3] [Ada] New GDB/MI command: -ada-tasks-info
Date: Mon, 19 Sep 2011 17:52:00 -0000	[thread overview]
Message-ID: <201109192126.26235.vladimir@codesourcery.com> (raw)
In-Reply-To: <1316205921-18702-2-git-send-email-brobecker@adacore.com>

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},


  reply	other threads:[~2011-09-19 17:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-16 20:45 [GDB/MI Ada] " Joel Brobecker
2011-09-16 20:46 ` [RFA 1/3] [Ada] " Joel Brobecker
2011-09-19 17:52   ` Vladimir Prus [this message]
2011-09-20  4:12     ` Joel Brobecker
2011-09-16 20:46 ` [PATCH 3/3] [Ada/doco] Document the new -ada-task-info GDB/MI command Joel Brobecker
2011-09-17  8:59   ` Eli Zaretskii
2011-09-16 22:44 ` [PATCH 2/3] [Ada] Add field "thread-id" in -ada-task-info output Joel Brobecker
2011-10-03 21:40 ` [GDB/MI Ada] New GDB/MI command: -ada-tasks-info Joel Brobecker
2011-09-20  6:09 [RFA 1/3] [Ada] " Prus, Vladimir

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201109192126.26235.vladimir@codesourcery.com \
    --to=vladimir@codesourcery.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox