gdb/testsuite: fix gdb.trace/signal.exp on x86
[binutils-gdb/blckswan.git] / gdb / cli / cli-cmds.h
blob770abecab8a2f0a0a894e798ae1a94e1f71c5572
1 /* Header file for GDB CLI command implementation library.
2 Copyright (C) 2000-2022 Free Software Foundation, Inc.
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.
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.
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/>. */
17 #ifndef CLI_CLI_CMDS_H
18 #define CLI_CLI_CMDS_H
20 #include "gdbsupport/filestuff.h"
21 #include "gdbsupport/gdb_optional.h"
22 #include "completer.h"
24 /* Chain containing all defined commands. */
26 extern struct cmd_list_element *cmdlist;
28 /* Chain containing all defined info subcommands. */
30 extern struct cmd_list_element *infolist;
32 /* Chain containing all defined enable subcommands. */
34 extern struct cmd_list_element *enablelist;
36 /* Chain containing all defined disable subcommands. */
38 extern struct cmd_list_element *disablelist;
40 /* Chain containing all defined delete subcommands. */
42 extern struct cmd_list_element *deletelist;
44 /* Chain containing all defined detach subcommands. */
46 extern struct cmd_list_element *detachlist;
48 /* Chain containing all defined kill subcommands. */
50 extern struct cmd_list_element *killlist;
52 /* Chain containing all defined stop subcommands. */
54 extern struct cmd_list_element *stoplist;
56 /* Chain containing all defined set subcommands */
58 extern struct cmd_list_element *setlist;
60 /* Chain containing all defined unset subcommands */
62 extern struct cmd_list_element *unsetlist;
64 /* Chain containing all defined show subcommands. */
66 extern struct cmd_list_element *showlist;
68 /* Chain containing all defined \"set history\". */
70 extern struct cmd_list_element *sethistlist;
72 /* Chain containing all defined \"show history\". */
74 extern struct cmd_list_element *showhistlist;
76 /* Chain containing all defined \"unset history\". */
78 extern struct cmd_list_element *unsethistlist;
80 /* Chain containing all defined maintenance subcommands. */
82 extern struct cmd_list_element *maintenancelist;
84 /* Chain containing all defined "maintenance info" subcommands. */
86 extern struct cmd_list_element *maintenanceinfolist;
88 /* Chain containing all defined "maintenance print" subcommands. */
90 extern struct cmd_list_element *maintenanceprintlist;
92 /* Chain containing all defined "maintenance flush" subcommands. */
94 extern struct cmd_list_element *maintenanceflushlist;
96 /* Chain containing all defined "maintenance check" subcommands. */
98 extern struct cmd_list_element *maintenancechecklist;
100 /* Chain containing all defined "maintenance set" subcommands. */
102 extern struct cmd_list_element *maintenance_set_cmdlist;
104 /* Chain containing all defined "maintenance show" subcommands. */
106 extern struct cmd_list_element *maintenance_show_cmdlist;
108 extern struct cmd_list_element *setprintlist;
110 extern struct cmd_list_element *showprintlist;
112 /* Chain containing all defined "set print raw" subcommands. */
114 extern struct cmd_list_element *setprintrawlist;
116 /* Chain containing all defined "show print raw" subcommands. */
118 extern struct cmd_list_element *showprintrawlist;
120 /* Chain containing all defined "set print type" subcommands. */
122 extern struct cmd_list_element *setprinttypelist;
124 /* Chain containing all defined "show print type" subcommands. */
126 extern struct cmd_list_element *showprinttypelist;
128 extern struct cmd_list_element *setdebuglist;
130 extern struct cmd_list_element *showdebuglist;
132 extern struct cmd_list_element *setchecklist;
134 extern struct cmd_list_element *showchecklist;
136 /* Chain containing all defined "save" subcommands. */
138 extern struct cmd_list_element *save_cmdlist;
140 /* Chain containing all defined "set source" subcommands. */
142 extern struct cmd_list_element *setsourcelist;
144 /* Chain containing all defined "show source" subcommands. */
146 extern struct cmd_list_element *showsourcelist;
148 /* Limit the call depth of user-defined commands */
150 extern unsigned int max_user_call_depth;
152 /* Exported to gdb/top.c */
154 void init_cmd_lists (void);
156 int is_complete_command (struct cmd_list_element *cmd);
158 /* Exported to gdb/main.c */
160 extern void cd_command (const char *, int);
162 /* Exported to gdb/top.c and gdb/main.c */
164 extern void quit_command (const char *, int);
166 extern void source_script (const char *, int);
168 /* Exported to objfiles.c. */
170 /* The script that was opened. */
171 struct open_script
173 gdb_file_up stream;
174 gdb::unique_xmalloc_ptr<char> full_path;
176 open_script (gdb_file_up &&stream_,
177 gdb::unique_xmalloc_ptr<char> &&full_path_)
178 : stream (std::move (stream_)),
179 full_path (std::move (full_path_))
184 extern gdb::optional<open_script>
185 find_and_open_script (const char *file, int search_path);
187 /* Command tracing state. */
189 extern int source_verbose;
190 extern bool trace_commands;
192 /* Common code for the "with" and "maintenance with" commands.
193 SET_CMD_PREFIX is the spelling of the corresponding "set" command
194 prefix: i.e., "set " or "maintenance set ". SETLIST is the command
195 element for the same "set" command prefix. */
196 extern void with_command_1 (const char *set_cmd_prefix,
197 cmd_list_element *setlist,
198 const char *args, int from_tty);
200 /* Common code for the completers of the "with" and "maintenance with"
201 commands. SET_CMD_PREFIX is the spelling of the corresponding
202 "set" command prefix: i.e., "set " or "maintenance set ". */
203 extern void with_command_completer_1 (const char *set_cmd_prefix,
204 completion_tracker &tracker,
205 const char *text);
207 #endif /* CLI_CLI_CMDS_H */