Commit | Line | Data |
---|---|---|
d318976c | 1 | /* Header file for GDB CLI command implementation library. |
42a4f53d | 2 | Copyright (C) 2000-2019 Free Software Foundation, Inc. |
d318976c FN |
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 | |
a9762ec7 | 6 | the Free Software Foundation; either version 3 of the License, or |
d318976c FN |
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 | |
a9762ec7 | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
d318976c | 16 | |
1a5c2598 TT |
17 | #ifndef CLI_CLI_CMDS_H |
18 | #define CLI_CLI_CMDS_H | |
d318976c | 19 | |
ed166945 TT |
20 | #include "common/filestuff.h" |
21 | #include "common/gdb_optional.h" | |
22 | ||
d318976c FN |
23 | /* Chain containing all defined commands. */ |
24 | ||
25 | extern struct cmd_list_element *cmdlist; | |
26 | ||
27 | /* Chain containing all defined info subcommands. */ | |
28 | ||
29 | extern struct cmd_list_element *infolist; | |
30 | ||
ebcd3b23 | 31 | /* Chain containing all defined enable subcommands. */ |
d318976c FN |
32 | |
33 | extern struct cmd_list_element *enablelist; | |
34 | ||
ebcd3b23 | 35 | /* Chain containing all defined disable subcommands. */ |
d318976c FN |
36 | |
37 | extern struct cmd_list_element *disablelist; | |
38 | ||
ebcd3b23 | 39 | /* Chain containing all defined delete subcommands. */ |
d318976c FN |
40 | |
41 | extern struct cmd_list_element *deletelist; | |
42 | ||
ebcd3b23 | 43 | /* Chain containing all defined detach subcommands. */ |
f73adfeb AS |
44 | |
45 | extern struct cmd_list_element *detachlist; | |
46 | ||
2277426b PA |
47 | /* Chain containing all defined kill subcommands. */ |
48 | ||
49 | extern struct cmd_list_element *killlist; | |
50 | ||
ebcd3b23 | 51 | /* Chain containing all defined stop subcommands. */ |
d318976c FN |
52 | |
53 | extern struct cmd_list_element *stoplist; | |
54 | ||
d318976c FN |
55 | /* Chain containing all defined set subcommands */ |
56 | ||
57 | extern struct cmd_list_element *setlist; | |
58 | ||
59 | /* Chain containing all defined unset subcommands */ | |
60 | ||
61 | extern struct cmd_list_element *unsetlist; | |
62 | ||
63 | /* Chain containing all defined show subcommands. */ | |
64 | ||
65 | extern struct cmd_list_element *showlist; | |
66 | ||
67 | /* Chain containing all defined \"set history\". */ | |
68 | ||
69 | extern struct cmd_list_element *sethistlist; | |
70 | ||
71 | /* Chain containing all defined \"show history\". */ | |
72 | ||
73 | extern struct cmd_list_element *showhistlist; | |
74 | ||
75 | /* Chain containing all defined \"unset history\". */ | |
76 | ||
77 | extern struct cmd_list_element *unsethistlist; | |
78 | ||
ebcd3b23 | 79 | /* Chain containing all defined maintenance subcommands. */ |
d318976c FN |
80 | |
81 | extern struct cmd_list_element *maintenancelist; | |
82 | ||
ebcd3b23 | 83 | /* Chain containing all defined "maintenance info" subcommands. */ |
d318976c FN |
84 | |
85 | extern struct cmd_list_element *maintenanceinfolist; | |
86 | ||
ebcd3b23 | 87 | /* Chain containing all defined "maintenance print" subcommands. */ |
d318976c FN |
88 | |
89 | extern struct cmd_list_element *maintenanceprintlist; | |
90 | ||
91 | extern struct cmd_list_element *setprintlist; | |
92 | ||
93 | extern struct cmd_list_element *showprintlist; | |
94 | ||
95 | extern struct cmd_list_element *setdebuglist; | |
96 | ||
97 | extern struct cmd_list_element *showdebuglist; | |
98 | ||
99 | extern struct cmd_list_element *setchecklist; | |
100 | ||
101 | extern struct cmd_list_element *showchecklist; | |
102 | ||
103 | /* Exported to gdb/top.c */ | |
104 | ||
105 | void init_cmd_lists (void); | |
106 | ||
107 | void init_cli_cmds (void); | |
108 | ||
bbaca940 | 109 | int is_complete_command (struct cmd_list_element *cmd); |
d318976c FN |
110 | |
111 | /* Exported to gdb/main.c */ | |
112 | ||
5e93d4c6 | 113 | extern void cd_command (const char *, int); |
d318976c FN |
114 | |
115 | /* Exported to gdb/top.c and gdb/main.c */ | |
116 | ||
0b39b52e | 117 | extern void quit_command (const char *, int); |
d318976c | 118 | |
50dd9793 | 119 | extern void source_script (const char *, int); |
d318976c | 120 | |
8a1ea21f DE |
121 | /* Exported to objfiles.c. */ |
122 | ||
ed166945 TT |
123 | /* The script that was opened. */ |
124 | struct open_script | |
125 | { | |
126 | gdb_file_up stream; | |
127 | gdb::unique_xmalloc_ptr<char> full_path; | |
128 | ||
129 | open_script (gdb_file_up &&stream_, | |
130 | gdb::unique_xmalloc_ptr<char> &&full_path_) | |
131 | : stream (std::move (stream_)), | |
132 | full_path (std::move (full_path_)) | |
133 | { | |
134 | } | |
135 | }; | |
136 | ||
137 | extern gdb::optional<open_script> | |
138 | find_and_open_script (const char *file, int search_path); | |
8a1ea21f | 139 | |
16026cd7 AS |
140 | /* Command tracing state. */ |
141 | ||
142 | extern int source_verbose; | |
143 | extern int trace_commands; | |
144 | ||
1a5c2598 | 145 | #endif /* CLI_CLI_CMDS_H */ |