aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/mi')
-rw-r--r--gdb/mi/mi-cmds.c1
-rw-r--r--gdb/mi/mi-cmds.h1
-rw-r--r--gdb/mi/mi-main.c13
3 files changed, 15 insertions, 0 deletions
diff --git a/gdb/mi/mi-cmds.c b/gdb/mi/mi-cmds.c
index 0b32db0..960d2dc 100644
--- a/gdb/mi/mi-cmds.c
+++ b/gdb/mi/mi-cmds.c
@@ -33,6 +33,7 @@ static void build_table (struct mi_cmd *commands);
struct mi_cmd mi_cmds[] =
{
+ { "ada-task-info", { NULL, 0 }, mi_cmd_ada_task_info },
{ "add-inferior", { NULL, 0 }, mi_cmd_add_inferior },
{ "break-after", { "ignore", 1 }, NULL },
{ "break-condition", { "cond", 1 }, NULL },
diff --git a/gdb/mi/mi-cmds.h b/gdb/mi/mi-cmds.h
index 18b4ad7..67aae59 100644
--- a/gdb/mi/mi-cmds.h
+++ b/gdb/mi/mi-cmds.h
@@ -36,6 +36,7 @@ extern const char mi_all_values[];
typedef void (mi_cmd_argv_ftype) (char *command, char **argv, int argc);
/* Function implementing each command */
+extern mi_cmd_argv_ftype mi_cmd_ada_task_info;
extern mi_cmd_argv_ftype mi_cmd_add_inferior;
extern mi_cmd_argv_ftype mi_cmd_break_insert;
extern mi_cmd_argv_ftype mi_cmd_break_commands;
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 4ab2012..a9c7652 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -52,6 +52,7 @@
#include "osdata.h"
#include "splay-tree.h"
#include "tracepoint.h"
+#include "ada-lang.h"
#include <ctype.h>
#include <sys/time.h>
@@ -1720,6 +1721,7 @@ mi_cmd_list_features (char *command, char **argv, int argc)
ui_out_field_string (uiout, NULL, "thread-info");
ui_out_field_string (uiout, NULL, "data-read-memory-bytes");
ui_out_field_string (uiout, NULL, "breakpoint-notifications");
+ ui_out_field_string (uiout, NULL, "ada-task-info");
#if HAVE_PYTHON
ui_out_field_string (uiout, NULL, "python");
@@ -2503,3 +2505,14 @@ mi_cmd_trace_stop (char *command, char **argv, int argc)
stop_tracing ();
trace_status_mi (1);
}
+
+/* Implement the "-ada-task-info" GDB/MI command. */
+
+void
+mi_cmd_ada_task_info (char *command, char **argv, int argc)
+{
+ if (argc != 0 && argc != 1)
+ error (_("Invalid MI command"));
+
+ print_ada_task_info (current_uiout, argv[0], current_inferior ());
+}