Don't include gdbarch.h from defs.h
[deliverable/binutils-gdb.git] / gdb / cli / cli-cmds.h
1 /* Header file for GDB CLI command implementation library.
2 Copyright (C) 2000-2019 Free Software Foundation, Inc.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
16
17 #ifndef CLI_CLI_CMDS_H
18 #define CLI_CLI_CMDS_H
19
20 #include "gdbsupport/filestuff.h"
21 #include "gdbsupport/gdb_optional.h"
22 #include "completer.h"
23
24 /* Chain containing all defined commands. */
25
26 extern struct cmd_list_element *cmdlist;
27
28 /* Chain containing all defined info subcommands. */
29
30 extern struct cmd_list_element *infolist;
31
32 /* Chain containing all defined enable subcommands. */
33
34 extern struct cmd_list_element *enablelist;
35
36 /* Chain containing all defined disable subcommands. */
37
38 extern struct cmd_list_element *disablelist;
39
40 /* Chain containing all defined delete subcommands. */
41
42 extern struct cmd_list_element *deletelist;
43
44 /* Chain containing all defined detach subcommands. */
45
46 extern struct cmd_list_element *detachlist;
47
48 /* Chain containing all defined kill subcommands. */
49
50 extern struct cmd_list_element *killlist;
51
52 /* Chain containing all defined stop subcommands. */
53
54 extern struct cmd_list_element *stoplist;
55
56 /* Chain containing all defined set subcommands */
57
58 extern struct cmd_list_element *setlist;
59
60 /* Chain containing all defined unset subcommands */
61
62 extern struct cmd_list_element *unsetlist;
63
64 /* Chain containing all defined show subcommands. */
65
66 extern struct cmd_list_element *showlist;
67
68 /* Chain containing all defined \"set history\". */
69
70 extern struct cmd_list_element *sethistlist;
71
72 /* Chain containing all defined \"show history\". */
73
74 extern struct cmd_list_element *showhistlist;
75
76 /* Chain containing all defined \"unset history\". */
77
78 extern struct cmd_list_element *unsethistlist;
79
80 /* Chain containing all defined maintenance subcommands. */
81
82 extern struct cmd_list_element *maintenancelist;
83
84 /* Chain containing all defined "maintenance info" subcommands. */
85
86 extern struct cmd_list_element *maintenanceinfolist;
87
88 /* Chain containing all defined "maintenance print" subcommands. */
89
90 extern struct cmd_list_element *maintenanceprintlist;
91
92 extern struct cmd_list_element *setprintlist;
93
94 extern struct cmd_list_element *showprintlist;
95
96 extern struct cmd_list_element *setdebuglist;
97
98 extern struct cmd_list_element *showdebuglist;
99
100 extern struct cmd_list_element *setchecklist;
101
102 extern struct cmd_list_element *showchecklist;
103
104 /* Exported to gdb/top.c */
105
106 void init_cmd_lists (void);
107
108 void init_cli_cmds (void);
109
110 int is_complete_command (struct cmd_list_element *cmd);
111
112 /* Exported to gdb/main.c */
113
114 extern void cd_command (const char *, int);
115
116 /* Exported to gdb/top.c and gdb/main.c */
117
118 extern void quit_command (const char *, int);
119
120 extern void source_script (const char *, int);
121
122 /* Exported to objfiles.c. */
123
124 /* The script that was opened. */
125 struct open_script
126 {
127 gdb_file_up stream;
128 gdb::unique_xmalloc_ptr<char> full_path;
129
130 open_script (gdb_file_up &&stream_,
131 gdb::unique_xmalloc_ptr<char> &&full_path_)
132 : stream (std::move (stream_)),
133 full_path (std::move (full_path_))
134 {
135 }
136 };
137
138 extern gdb::optional<open_script>
139 find_and_open_script (const char *file, int search_path);
140
141 /* Command tracing state. */
142
143 extern int source_verbose;
144 extern int trace_commands;
145
146 /* Common code for the "with" and "maintenance with" commands.
147 SET_CMD_PREFIX is the spelling of the corresponding "set" command
148 prefix: i.e., "set " or "maintenance set ". SETLIST is the command
149 element for the same "set" command prefix. */
150 extern void with_command_1 (const char *set_cmd_prefix,
151 cmd_list_element *setlist,
152 const char *args, int from_tty);
153
154 /* Common code for the completers of the "with" and "maintenance with"
155 commands. SET_CMD_PREFIX is the spelling of the corresponding
156 "set" command prefix: i.e., "set " or "maintenance set ". */
157 extern void with_command_completer_1 (const char *set_cmd_prefix,
158 completion_tracker &tracker,
159 const char *text);
160
161 #endif /* CLI_CLI_CMDS_H */
This page took 0.034607 seconds and 5 git commands to generate.