[RFA 1/3] [Ada] New GDB/MI command: -ada-tasks-info
Vladimir Prus
vladimir@codesourcery.com
Mon Sep 19 17:52:00 GMT 2011
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},
More information about the Gdb-patches
mailing list