2000-03-22 Mark Kettenis <kettenis@gnu.org>
[deliverable/binutils-gdb.git] / gdb / mi / mi-cmds.h
CommitLineData
fb40c209
AC
1/* MI Command Set.
2 Copyright (C) 2000, Free Software Foundation, Inc.
ab91fdd5 3 Contributed by Cygnus Solutions (a Red Hat company).
fb40c209
AC
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;
24e8cecf 66extern mi_cmd_argv_ftype mi_cmd_data_write_register_values;
fb40c209
AC
67extern mi_cmd_args_ftype mi_cmd_exec_continue;
68extern mi_cmd_args_ftype mi_cmd_exec_finish;
69extern mi_cmd_args_ftype mi_cmd_exec_next;
70extern mi_cmd_args_ftype mi_cmd_exec_next_instruction;
71extern mi_cmd_args_ftype mi_cmd_exec_return;
72extern mi_cmd_args_ftype mi_cmd_exec_run;
73extern mi_cmd_args_ftype mi_cmd_exec_step;
74extern mi_cmd_args_ftype mi_cmd_exec_step_instruction;
75extern mi_cmd_args_ftype mi_cmd_exec_until;
76extern mi_cmd_args_ftype mi_cmd_exec_interrupt;
77extern mi_cmd_argv_ftype mi_cmd_gdb_exit;
78extern mi_cmd_argv_ftype mi_cmd_stack_info_depth;
79extern mi_cmd_argv_ftype mi_cmd_stack_list_args;
80extern mi_cmd_argv_ftype mi_cmd_stack_list_frames;
81extern mi_cmd_argv_ftype mi_cmd_stack_list_locals;
82extern mi_cmd_argv_ftype mi_cmd_stack_select_frame;
83extern mi_cmd_args_ftype mi_cmd_target_download;
84extern mi_cmd_args_ftype mi_cmd_target_select;
85extern mi_cmd_argv_ftype mi_cmd_thread_list_ids;
86extern mi_cmd_argv_ftype mi_cmd_thread_select;
87extern mi_cmd_argv_ftype mi_cmd_var_assign;
88extern mi_cmd_argv_ftype mi_cmd_var_create;
89extern mi_cmd_argv_ftype mi_cmd_var_delete;
90extern mi_cmd_argv_ftype mi_cmd_var_evaluate_expression;
91extern mi_cmd_argv_ftype mi_cmd_var_info_expression;
92extern mi_cmd_argv_ftype mi_cmd_var_info_num_children;
93extern mi_cmd_argv_ftype mi_cmd_var_info_type;
94extern mi_cmd_argv_ftype mi_cmd_var_list_children;
95extern mi_cmd_argv_ftype mi_cmd_var_set_format;
96extern mi_cmd_argv_ftype mi_cmd_var_show_attributes;
97extern mi_cmd_argv_ftype mi_cmd_var_show_format;
98extern mi_cmd_argv_ftype mi_cmd_var_update;
99
100/* Description of a single command. */
101
102struct mi_cmd
103 {
104 /* official name of the command */
105 const char *name;
106 /* If non-null, the corresponding CLI command that can be used to
107 implement this MI command */
108 const char *cli;
109 /* If non-null, the function implementing the MI command */
110 mi_cmd_args_ftype *args_func;
111 /* If non-null, the function implementing the MI command */
112 mi_cmd_argv_ftype *argv_func;
113 };
114
115/* Lookup a command in the mi comand table */
116
117extern struct mi_cmd *mi_lookup (const char *command);
118
119/* Debug flag */
120extern int mi_debug_p;
121
122/* Raw console output - FIXME: should this be a parameter? */
123extern struct ui_file *raw_stdout;
124
125#endif
126
127/* Local variables: */
128/* change-log-default-name: "ChangeLog-mi" */
129/* End: */
This page took 0.03694 seconds and 4 git commands to generate.