GDB (xrefs)
Loading...
Searching...
No Matches
cli-cmds.h
Go to the documentation of this file.
1/* Header file for GDB CLI command implementation library.
2 Copyright (C) 2000-2023 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
26extern struct cmd_list_element *cmdlist;
27
28/* Chain containing all defined info subcommands. */
29
30extern struct cmd_list_element *infolist;
31
32/* Chain containing all defined enable subcommands. */
33
34extern struct cmd_list_element *enablelist;
35
36/* Chain containing all defined disable subcommands. */
37
38extern struct cmd_list_element *disablelist;
39
40/* Chain containing all defined delete subcommands. */
41
42extern struct cmd_list_element *deletelist;
43
44/* Chain containing all defined detach subcommands. */
45
46extern struct cmd_list_element *detachlist;
47
48/* Chain containing all defined kill subcommands. */
49
50extern struct cmd_list_element *killlist;
51
52/* Chain containing all defined stop subcommands. */
53
54extern struct cmd_list_element *stoplist;
55
56/* Chain containing all defined set subcommands */
57
58extern struct cmd_list_element *setlist;
59
60/* Chain containing all defined unset subcommands */
61
62extern struct cmd_list_element *unsetlist;
63
64/* Chain containing all defined show subcommands. */
65
66extern struct cmd_list_element *showlist;
67
68/* Chain containing all defined \"set history\". */
69
70extern struct cmd_list_element *sethistlist;
71
72/* Chain containing all defined \"show history\". */
73
74extern struct cmd_list_element *showhistlist;
75
76/* Chain containing all defined \"unset history\". */
77
78extern struct cmd_list_element *unsethistlist;
79
80/* Chain containing all defined maintenance subcommands. */
81
83
84/* Chain containing all defined "maintenance info" subcommands. */
85
87
88/* Chain containing all defined "maintenance print" subcommands. */
89
91
92/* Chain containing all defined "maintenance flush" subcommands. */
93
95
96/* Chain containing all defined "maintenance check" subcommands. */
97
99
100/* Chain containing all defined "maintenance set" subcommands. */
101
103
104/* Chain containing all defined "maintenance show" subcommands. */
105
107
108extern struct cmd_list_element *setprintlist;
109
110extern struct cmd_list_element *showprintlist;
111
112/* Chain containing all defined "set print raw" subcommands. */
113
114extern struct cmd_list_element *setprintrawlist;
115
116/* Chain containing all defined "show print raw" subcommands. */
117
119
120/* Chain containing all defined "set print type" subcommands. */
121
123
124/* Chain containing all defined "show print type" subcommands. */
125
127
128extern struct cmd_list_element *setdebuglist;
129
130extern struct cmd_list_element *showdebuglist;
131
132extern struct cmd_list_element *setchecklist;
133
134extern struct cmd_list_element *showchecklist;
135
136/* Chain containing all defined "save" subcommands. */
137
138extern struct cmd_list_element *save_cmdlist;
139
140/* Chain containing all defined "set source" subcommands. */
141
142extern struct cmd_list_element *setsourcelist;
143
144/* Chain containing all defined "show source" subcommands. */
145
146extern struct cmd_list_element *showsourcelist;
147
148/* Limit the call depth of user-defined commands */
149
150extern unsigned int max_user_call_depth;
151
152/* Exported to gdb/top.c */
153
154int is_complete_command (struct cmd_list_element *cmd);
155
156/* Exported to gdb/main.c */
157
158extern void cd_command (const char *, int);
159
160/* Exported to gdb/top.c and gdb/main.c */
161
162extern void quit_command (const char *, int);
163
164extern void source_script (const char *, int);
165
166/* Exported to objfiles.c. */
167
168/* The script that was opened. */
170{
171 gdb_file_up stream;
172 gdb::unique_xmalloc_ptr<char> full_path;
173
174 open_script (gdb_file_up &&stream_,
175 gdb::unique_xmalloc_ptr<char> &&full_path_)
176 : stream (std::move (stream_)),
177 full_path (std::move (full_path_))
178 {
179 }
180};
181
182extern gdb::optional<open_script>
183 find_and_open_script (const char *file, int search_path);
184
185/* Command tracing state. */
186
187extern int source_verbose;
188extern bool trace_commands;
189
190/* Common code for the "with" and "maintenance with" commands.
191 SET_CMD_PREFIX is the spelling of the corresponding "set" command
192 prefix: i.e., "set " or "maintenance set ". SETLIST is the command
193 element for the same "set" command prefix. */
194extern void with_command_1 (const char *set_cmd_prefix,
196 const char *args, int from_tty);
197
198/* Common code for the completers of the "with" and "maintenance with"
199 commands. SET_CMD_PREFIX is the spelling of the corresponding
200 "set" command prefix: i.e., "set " or "maintenance set ". */
201extern void with_command_completer_1 (const char *set_cmd_prefix,
202 completion_tracker &tracker,
203 const char *text);
204
205#endif /* CLI_CLI_CMDS_H */
struct cmd_list_element * showlist
Definition: cli-cmds.c:125
struct cmd_list_element * showprintlist
Definition: cli-cmds.c:161
gdb::optional< open_script > find_and_open_script(const char *file, int search_path)
Definition: cli-cmds.c:657
struct cmd_list_element * maintenance_show_cmdlist
Definition: maint.c:752
unsigned int max_user_call_depth
Definition: cli-cmds.c:79
int is_complete_command(struct cmd_list_element *cmd)
Definition: cli-cmds.c:454
struct cmd_list_element * infolist
Definition: cli-cmds.c:89
struct cmd_list_element * showprinttypelist
Definition: typeprint.c:719
struct cmd_list_element * deletelist
Definition: cli-cmds.c:105
bool trace_commands
Definition: cli-cmds.c:178
struct cmd_list_element * showhistlist
Definition: cli-cmds.c:133
struct cmd_list_element * maintenanceprintlist
Definition: cli-cmds.c:149
struct cmd_list_element * setsourcelist
Definition: cli-cmds.c:171
struct cmd_list_element * maintenancechecklist
Definition: cli-cmds.c:153
struct cmd_list_element * stoplist
Definition: cli-cmds.c:101
void quit_command(const char *, int)
Definition: cli-cmds.c:475
struct cmd_list_element * showprintrawlist
Definition: valprint.c:84
struct cmd_list_element * setchecklist
Definition: cli-cmds.c:167
struct cmd_list_element * cmdlist
Definition: cli-cmds.c:85
struct cmd_list_element * setprintlist
Definition: cli-cmds.c:159
struct cmd_list_element * setlist
Definition: cli-cmds.c:117
struct cmd_list_element * showdebuglist
Definition: cli-cmds.c:165
struct cmd_list_element * detachlist
Definition: cli-cmds.c:109
void source_script(const char *, int)
Definition: cli-cmds.c:780
struct cmd_list_element * disablelist
Definition: cli-cmds.c:97
struct cmd_list_element * showchecklist
Definition: cli-cmds.c:169
struct cmd_list_element * maintenanceflushlist
Definition: cli-cmds.c:157
struct cmd_list_element * maintenance_set_cmdlist
Definition: maint.c:751
struct cmd_list_element * showsourcelist
Definition: cli-cmds.c:173
struct cmd_list_element * save_cmdlist
Definition: breakpoint.c:758
void cd_command(const char *, int)
Definition: cli-cmds.c:533
struct cmd_list_element * maintenancelist
Definition: cli-cmds.c:141
int source_verbose
Definition: cli-cmds.c:177
struct cmd_list_element * enablelist
Definition: cli-cmds.c:93
void with_command_completer_1(const char *set_cmd_prefix, completion_tracker &tracker, const char *text)
Definition: cli-cmds.c:290
struct cmd_list_element * unsethistlist
Definition: cli-cmds.c:137
void with_command_1(const char *set_cmd_prefix, cmd_list_element *setlist, const char *args, int from_tty)
Definition: cli-cmds.c:223
struct cmd_list_element * maintenanceinfolist
Definition: cli-cmds.c:145
struct cmd_list_element * killlist
Definition: cli-cmds.c:113
struct cmd_list_element * setdebuglist
Definition: cli-cmds.c:163
struct cmd_list_element * setprintrawlist
Definition: valprint.c:83
struct cmd_list_element * sethistlist
Definition: cli-cmds.c:129
struct cmd_list_element * unsetlist
Definition: cli-cmds.c:121
struct cmd_list_element * setprinttypelist
Definition: typeprint.c:717
Definition: aarch64.h:50
open_script(gdb_file_up &&stream_, gdb::unique_xmalloc_ptr< char > &&full_path_)
Definition: cli-cmds.h:174
gdb_file_up stream
Definition: cli-cmds.h:171
gdb::unique_xmalloc_ptr< char > full_path
Definition: cli-cmds.h:172