Revert.
[deliverable/binutils-gdb.git] / gdb / mi / mi-cmds.h
CommitLineData
fb40c209
AC
1/* MI Command Set.
2 Copyright (C) 2000, Free Software Foundation, Inc.
3 Contributed by Cygnus Solutions.
4
5 This file is part of GDB.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
21
22#ifndef MI_CMDS_H
23#define MI_CMDS_H
24
25/* An MI command can return any of the following. */
26
27enum mi_cmd_result
28 {
29 /* Report the command as ``done''. Display both the ``NNN^done''
30 message and the completion prompt. */
31 MI_CMD_DONE = 0,
32 /* The command is still running in the forground. Main loop should
33 display the completion prompt. */
34 MI_CMD_FORGROUND,
35 /* An error condition was detected and an error message was
36 asprintf'd into the mi_error_message buffer. The main loop will
37 display the error message and the completion prompt. */
38 MI_CMD_ERROR,
39 /* An error condition was detected and caught. The error message is
40 in the global error message buffer. The main loop will display
41 the error message and the completion prompt. */
42 MI_CMD_CAUGHT_ERROR,
43 /* The MI command has already displayed its completion message.
44 Main loop will not display a completion message but will display
45 the completion prompt. */
46 MI_CMD_QUIET
47 };
48
49typedef enum mi_cmd_result (mi_cmd_argv_ftype) (char *command, char **argv, int argc);
50
51/* Older MI commands have this interface. Retained until all old
52 commands are flushed. */
53
54typedef enum mi_cmd_result (mi_cmd_args_ftype) ( /*ui */ char *args, int from_tty);
55
56/* Function implementing each command */
57extern mi_cmd_argv_ftype mi_cmd_break_insert;
58extern mi_cmd_argv_ftype mi_cmd_break_watch;
59extern mi_cmd_argv_ftype mi_cmd_disassemble;
60extern mi_cmd_argv_ftype mi_cmd_data_evaluate_expression;
61extern mi_cmd_argv_ftype mi_cmd_data_list_register_names;
62extern mi_cmd_argv_ftype mi_cmd_data_list_register_values;
63extern mi_cmd_argv_ftype mi_cmd_data_list_changed_registers;
64extern mi_cmd_argv_ftype mi_cmd_data_read_memory;
65extern mi_cmd_argv_ftype mi_cmd_data_write_memory;
66extern mi_cmd_args_ftype mi_cmd_exec_continue;
67extern mi_cmd_args_ftype mi_cmd_exec_finish;
68extern mi_cmd_args_ftype mi_cmd_exec_next;
69extern mi_cmd_args_ftype mi_cmd_exec_next_instruction;
70extern mi_cmd_args_ftype mi_cmd_exec_return;
71extern mi_cmd_args_ftype mi_cmd_exec_run;
72extern mi_cmd_args_ftype mi_cmd_exec_step;
73extern mi_cmd_args_ftype mi_cmd_exec_step_instruction;
74extern mi_cmd_args_ftype mi_cmd_exec_until;
75extern mi_cmd_args_ftype mi_cmd_exec_interrupt;
76extern mi_cmd_argv_ftype mi_cmd_gdb_exit;
77extern mi_cmd_argv_ftype mi_cmd_stack_info_depth;
78extern mi_cmd_argv_ftype mi_cmd_stack_list_args;
79extern mi_cmd_argv_ftype mi_cmd_stack_list_frames;
80extern mi_cmd_argv_ftype mi_cmd_stack_list_locals;
81extern mi_cmd_argv_ftype mi_cmd_stack_select_frame;
82extern mi_cmd_args_ftype mi_cmd_target_download;
83extern mi_cmd_args_ftype mi_cmd_target_select;
84extern mi_cmd_argv_ftype mi_cmd_thread_list_ids;
85extern mi_cmd_argv_ftype mi_cmd_thread_select;
86extern mi_cmd_argv_ftype mi_cmd_var_assign;
87extern mi_cmd_argv_ftype mi_cmd_var_create;
88extern mi_cmd_argv_ftype mi_cmd_var_delete;
89extern mi_cmd_argv_ftype mi_cmd_var_evaluate_expression;
90extern mi_cmd_argv_ftype mi_cmd_var_info_expression;
91extern mi_cmd_argv_ftype mi_cmd_var_info_num_children;
92extern mi_cmd_argv_ftype mi_cmd_var_info_type;
93extern mi_cmd_argv_ftype mi_cmd_var_list_children;
94extern mi_cmd_argv_ftype mi_cmd_var_set_format;
95extern mi_cmd_argv_ftype mi_cmd_var_show_attributes;
96extern mi_cmd_argv_ftype mi_cmd_var_show_format;
97extern mi_cmd_argv_ftype mi_cmd_var_update;
98
99/* Description of a single command. */
100
101struct mi_cmd
102 {
103 /* official name of the command */
104 const char *name;
105 /* If non-null, the corresponding CLI command that can be used to
106 implement this MI command */
107 const char *cli;
108 /* If non-null, the function implementing the MI command */
109 mi_cmd_args_ftype *args_func;
110 /* If non-null, the function implementing the MI command */
111 mi_cmd_argv_ftype *argv_func;
112 };
113
114/* Lookup a command in the mi comand table */
115
116extern struct mi_cmd *mi_lookup (const char *command);
117
118/* Debug flag */
119extern int mi_debug_p;
120
121/* Raw console output - FIXME: should this be a parameter? */
122extern struct ui_file *raw_stdout;
123
124#endif
125
126/* Local variables: */
127/* change-log-default-name: "ChangeLog-mi" */
128/* End: */
This page took 0.02716 seconds and 4 git commands to generate.