Emit inferior, thread and frame selection events to all UIs
[deliverable/binutils-gdb.git] / gdb / mi / mi-cmds.c
index eb67abe0159a325044269510a4faec485e206053..85c19c1278995514bfba66e8b5d436cc2ea2efb2 100644 (file)
@@ -1,5 +1,5 @@
 /* MI Command Set for GDB, the GNU debugger.
-   Copyright (C) 2000-2013 Free Software Foundation, Inc.
+   Copyright (C) 2000-2016 Free Software Foundation, Inc.
 
    Contributed by Cygnus Solutions (a Red Hat company).
 
@@ -21,7 +21,6 @@
 #include "defs.h"
 #include "top.h"
 #include "mi-cmds.h"
-#include "gdb_string.h"
 #include "mi-main.h"
 
 extern void _initialize_mi_cmds (void);
@@ -68,6 +67,10 @@ static struct mi_cmd mi_cmds[] =
                   &mi_suppress_notification.breakpoint),
   DEF_MI_CMD_MI_1 ("break-watch", mi_cmd_break_watch,
                   &mi_suppress_notification.breakpoint),
+  DEF_MI_CMD_MI_1 ("catch-assert", mi_cmd_catch_assert,
+                   &mi_suppress_notification.breakpoint),
+  DEF_MI_CMD_MI_1 ("catch-exception", mi_cmd_catch_exception,
+                   &mi_suppress_notification.breakpoint),
   DEF_MI_CMD_MI_1 ("catch-load", mi_cmd_catch_load,
                    &mi_suppress_notification.breakpoint),
   DEF_MI_CMD_MI_1 ("catch-unload", mi_cmd_catch_unload,
@@ -120,6 +123,8 @@ static struct mi_cmd mi_cmds[] =
   DEF_MI_CMD_CLI ("gdb-version", "show version", 0),
   DEF_MI_CMD_MI ("inferior-tty-set", mi_cmd_inferior_tty_set),
   DEF_MI_CMD_MI ("inferior-tty-show", mi_cmd_inferior_tty_show),
+  DEF_MI_CMD_MI ("info-ada-exceptions", mi_cmd_info_ada_exceptions),
+  DEF_MI_CMD_MI ("info-gdb-mi-command", mi_cmd_info_gdb_mi_command),
   DEF_MI_CMD_MI ("info-os", mi_cmd_info_os),
   DEF_MI_CMD_MI ("interpreter-exec", mi_cmd_interpreter_exec),
   DEF_MI_CMD_MI ("list-features", mi_cmd_list_features),
@@ -132,7 +137,8 @@ static struct mi_cmd mi_cmds[] =
   DEF_MI_CMD_MI ("stack-list-frames", mi_cmd_stack_list_frames),
   DEF_MI_CMD_MI ("stack-list-locals", mi_cmd_stack_list_locals),
   DEF_MI_CMD_MI ("stack-list-variables", mi_cmd_stack_list_variables),
-  DEF_MI_CMD_MI ("stack-select-frame", mi_cmd_stack_select_frame),
+  DEF_MI_CMD_MI_1 ("stack-select-frame", mi_cmd_stack_select_frame,
+                  &mi_suppress_notification.user_selected_context),
   DEF_MI_CMD_MI ("symbol-list-lines", mi_cmd_symbol_list_lines),
   DEF_MI_CMD_CLI ("target-attach", "attach", 1),
   DEF_MI_CMD_MI ("target-detach", mi_cmd_target_detach),
@@ -144,10 +150,13 @@ static struct mi_cmd mi_cmds[] =
   DEF_MI_CMD_CLI ("target-select", "target", 1),
   DEF_MI_CMD_MI ("thread-info", mi_cmd_thread_info),
   DEF_MI_CMD_MI ("thread-list-ids", mi_cmd_thread_list_ids),
-  DEF_MI_CMD_MI ("thread-select", mi_cmd_thread_select),
+  DEF_MI_CMD_MI_1 ("thread-select", mi_cmd_thread_select,
+                  &mi_suppress_notification.user_selected_context),
   DEF_MI_CMD_MI ("trace-define-variable", mi_cmd_trace_define_variable),
   DEF_MI_CMD_MI_1 ("trace-find", mi_cmd_trace_find,
                   &mi_suppress_notification.traceframe),
+  DEF_MI_CMD_MI ("trace-frame-collected",
+                mi_cmd_trace_frame_collected),
   DEF_MI_CMD_MI ("trace-list-variables", mi_cmd_trace_list_variables),
   DEF_MI_CMD_MI ("trace-save", mi_cmd_trace_save),
   DEF_MI_CMD_MI ("trace-start", mi_cmd_trace_start),
@@ -239,10 +248,8 @@ build_table (struct mi_cmd *commands)
   int nr_rehash = 0;
   int nr_entries = 0;
   struct mi_cmd *command;
-  int sizeof_table = sizeof (struct mi_cmd **) * MI_TABLE_SIZE;
 
-  mi_table = xmalloc (sizeof_table);
-  memset (mi_table, 0, sizeof_table);
+  mi_table = XCNEWVEC (struct mi_cmd *, MI_TABLE_SIZE);
   for (command = commands; command->name != 0; command++)
     {
       struct mi_cmd **entry = lookup_table (command->name);
This page took 0.02504 seconds and 4 git commands to generate.