+2011-10-03 Joel Brobecker <brobecker@adacore.com>
+
+ * 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.
+
2011-10-03 Joel Brobecker <brobecker@adacore.com>
* python/python.c (python_run_simple_file): New function.
#define ADA_LANG_H 1
struct frame_info;
+struct inferior;
#include "value.h"
#include "gdbtypes.h"
extern int ada_build_task_list (void);
+extern void print_ada_task_info (struct ui_out *uiout,
+ char *taskno_str,
+ struct inferior *inf);
+
#endif
interpreted as a task number, and the table will be limited to
that task only. */
-static void
+void
print_ada_task_info (struct ui_out *uiout,
char *arg_str,
struct inferior *inf)
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 },
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;
#include "osdata.h"
#include "splay-tree.h"
#include "tracepoint.h"
+#include "ada-lang.h"
#include <ctype.h>
#include <sys/time.h>
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");
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 ());
+}