xref: /dragonfly/contrib/gdb-7/gdb/mi/mi-cmds.h (revision ef5ccd6c)
15796c8dcSSimon Schubert /* MI Command Set for GDB, the GNU debugger.
25796c8dcSSimon Schubert 
3*ef5ccd6cSJohn Marino    Copyright (C) 2000-2013 Free Software Foundation, Inc.
45796c8dcSSimon Schubert 
55796c8dcSSimon Schubert    Contributed by Cygnus Solutions (a Red Hat company).
65796c8dcSSimon Schubert 
75796c8dcSSimon Schubert    This file is part of GDB.
85796c8dcSSimon Schubert 
95796c8dcSSimon Schubert    This program is free software; you can redistribute it and/or modify
105796c8dcSSimon Schubert    it under the terms of the GNU General Public License as published by
115796c8dcSSimon Schubert    the Free Software Foundation; either version 3 of the License, or
125796c8dcSSimon Schubert    (at your option) any later version.
135796c8dcSSimon Schubert 
145796c8dcSSimon Schubert    This program is distributed in the hope that it will be useful,
155796c8dcSSimon Schubert    but WITHOUT ANY WARRANTY; without even the implied warranty of
165796c8dcSSimon Schubert    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
175796c8dcSSimon Schubert    GNU General Public License for more details.
185796c8dcSSimon Schubert 
195796c8dcSSimon Schubert    You should have received a copy of the GNU General Public License
205796c8dcSSimon Schubert    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
215796c8dcSSimon Schubert 
225796c8dcSSimon Schubert #ifndef MI_CMDS_H
235796c8dcSSimon Schubert #define MI_CMDS_H
245796c8dcSSimon Schubert 
255796c8dcSSimon Schubert enum print_values {
265796c8dcSSimon Schubert    PRINT_NO_VALUES,
275796c8dcSSimon Schubert    PRINT_ALL_VALUES,
285796c8dcSSimon Schubert    PRINT_SIMPLE_VALUES
295796c8dcSSimon Schubert };
305796c8dcSSimon Schubert 
315796c8dcSSimon Schubert extern const char mi_no_values[];
325796c8dcSSimon Schubert extern const char mi_simple_values[];
335796c8dcSSimon Schubert extern const char mi_all_values[];
345796c8dcSSimon Schubert 
355796c8dcSSimon Schubert typedef void (mi_cmd_argv_ftype) (char *command, char **argv, int argc);
365796c8dcSSimon Schubert 
37*ef5ccd6cSJohn Marino /* Declarations of the functions implementing each command.  */
38*ef5ccd6cSJohn Marino 
39a45ae5f8SJohn Marino extern mi_cmd_argv_ftype mi_cmd_ada_task_info;
40cf7f2e2dSJohn Marino extern mi_cmd_argv_ftype mi_cmd_add_inferior;
415796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_break_insert;
425796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_break_commands;
43cf7f2e2dSJohn Marino extern mi_cmd_argv_ftype mi_cmd_break_passcount;
445796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_break_watch;
45*ef5ccd6cSJohn Marino extern mi_cmd_argv_ftype mi_cmd_catch_load;
46*ef5ccd6cSJohn Marino extern mi_cmd_argv_ftype mi_cmd_catch_unload;
475796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_disassemble;
485796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_data_evaluate_expression;
495796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_data_list_register_names;
505796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_data_list_register_values;
515796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_data_list_changed_registers;
525796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_data_read_memory;
53c50c785cSJohn Marino extern mi_cmd_argv_ftype mi_cmd_data_read_memory_bytes;
545796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_data_write_memory;
55c50c785cSJohn Marino extern mi_cmd_argv_ftype mi_cmd_data_write_memory_bytes;
565796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_data_write_register_values;
575796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_enable_timings;
585796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_env_cd;
595796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_env_dir;
605796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_env_path;
615796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_env_pwd;
625796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_exec_continue;
635796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_exec_finish;
64cf7f2e2dSJohn Marino extern mi_cmd_argv_ftype mi_cmd_exec_interrupt;
655796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_exec_jump;
665796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_exec_next;
675796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_exec_next_instruction;
685796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_exec_return;
69cf7f2e2dSJohn Marino extern mi_cmd_argv_ftype mi_cmd_exec_run;
705796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_exec_step;
715796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_exec_step_instruction;
725796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_file_list_exec_source_file;
735796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_file_list_exec_source_files;
745796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_gdb_exit;
755796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_inferior_tty_set;
765796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_inferior_tty_show;
77*ef5ccd6cSJohn Marino extern mi_cmd_argv_ftype mi_cmd_info_os;
785796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_interpreter_exec;
795796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_list_features;
805796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_list_target_features;
815796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_list_thread_groups;
82cf7f2e2dSJohn Marino extern mi_cmd_argv_ftype mi_cmd_remove_inferior;
835796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_stack_info_depth;
845796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_stack_info_frame;
855796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_stack_list_args;
865796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_stack_list_frames;
875796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_stack_list_locals;
88cf7f2e2dSJohn Marino extern mi_cmd_argv_ftype mi_cmd_stack_list_variables;
895796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_stack_select_frame;
905796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_symbol_list_lines;
915796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_target_detach;
925796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_target_file_get;
935796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_target_file_put;
945796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_target_file_delete;
955796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_thread_info;
965796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_thread_list_ids;
975796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_thread_select;
98cf7f2e2dSJohn Marino extern mi_cmd_argv_ftype mi_cmd_trace_define_variable;
99cf7f2e2dSJohn Marino extern mi_cmd_argv_ftype mi_cmd_trace_find;
100cf7f2e2dSJohn Marino extern mi_cmd_argv_ftype mi_cmd_trace_list_variables;
101cf7f2e2dSJohn Marino extern mi_cmd_argv_ftype mi_cmd_trace_save;
102cf7f2e2dSJohn Marino extern mi_cmd_argv_ftype mi_cmd_trace_start;
103cf7f2e2dSJohn Marino extern mi_cmd_argv_ftype mi_cmd_trace_status;
104cf7f2e2dSJohn Marino extern mi_cmd_argv_ftype mi_cmd_trace_stop;
1055796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_var_assign;
1065796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_var_create;
1075796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_var_delete;
1085796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_var_evaluate_expression;
1095796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_var_info_expression;
1105796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_var_info_path_expression;
1115796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_var_info_num_children;
1125796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_var_info_type;
1135796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_var_list_children;
1145796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_var_set_format;
1155796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_var_set_frozen;
1165796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_var_set_visualizer;
1175796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_var_show_attributes;
1185796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_var_show_format;
1195796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_var_update;
1205796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_enable_pretty_printing;
1215796c8dcSSimon Schubert extern mi_cmd_argv_ftype mi_cmd_var_set_update_range;
1225796c8dcSSimon Schubert 
1235796c8dcSSimon Schubert /* Description of a single command.  */
1245796c8dcSSimon Schubert 
1255796c8dcSSimon Schubert struct mi_cli
1265796c8dcSSimon Schubert {
1275796c8dcSSimon Schubert   /* Corresponding CLI command.  If ARGS_P is non-zero, the MI
1285796c8dcSSimon Schubert      command's argument list is appended to the CLI command.  */
1295796c8dcSSimon Schubert   const char *cmd;
1305796c8dcSSimon Schubert   int args_p;
1315796c8dcSSimon Schubert };
1325796c8dcSSimon Schubert 
1335796c8dcSSimon Schubert struct mi_cmd
1345796c8dcSSimon Schubert {
135*ef5ccd6cSJohn Marino   /* Official name of the command.  */
1365796c8dcSSimon Schubert   const char *name;
1375796c8dcSSimon Schubert   /* The corresponding CLI command that can be used to implement this
1385796c8dcSSimon Schubert      MI command (if cli.lhs is non NULL).  */
1395796c8dcSSimon Schubert   struct mi_cli cli;
1405796c8dcSSimon Schubert   /* If non-null, the function implementing the MI command.  */
1415796c8dcSSimon Schubert   mi_cmd_argv_ftype *argv_func;
142*ef5ccd6cSJohn Marino   /* If non-null, the pointer to a field in
143*ef5ccd6cSJohn Marino      'struct mi_suppress_notification', which will be set to true by MI
144*ef5ccd6cSJohn Marino      command processor (mi-main.c:mi_cmd_execute) when this command is
145*ef5ccd6cSJohn Marino      being executed.  It will be set back to false when command has been
146*ef5ccd6cSJohn Marino      executed.  */
147*ef5ccd6cSJohn Marino   int *suppress_notification;
1485796c8dcSSimon Schubert };
1495796c8dcSSimon Schubert 
150*ef5ccd6cSJohn Marino /* Lookup a command in the MI command table.  */
1515796c8dcSSimon Schubert 
1525796c8dcSSimon Schubert extern struct mi_cmd *mi_lookup (const char *command);
1535796c8dcSSimon Schubert 
1545796c8dcSSimon Schubert /* Debug flag */
1555796c8dcSSimon Schubert extern int mi_debug_p;
1565796c8dcSSimon Schubert 
1575796c8dcSSimon Schubert /* Raw console output - FIXME: should this be a parameter? */
1585796c8dcSSimon Schubert extern struct ui_file *raw_stdout;
1595796c8dcSSimon Schubert 
160*ef5ccd6cSJohn Marino extern void mi_execute_command (const char *cmd, int from_tty);
1615796c8dcSSimon Schubert 
1625796c8dcSSimon Schubert #endif
163