GDB (xrefs)
cli-cmds.h
Go to the documentation of this file.
1 /* Header file for GDB CLI command implementation library.
2  Copyright (C) 2000-2018 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 #if !defined (CLI_CMDS_H)
18 #define CLI_CMDS_H 1
19 
20 #include "common/filestuff.h"
21 #include "common/gdb_optional.h"
22 
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 
31 /* Chain containing all defined enable subcommands. */
32 
33 extern struct cmd_list_element *enablelist;
34 
35 /* Chain containing all defined disable subcommands. */
36 
37 extern struct cmd_list_element *disablelist;
38 
39 /* Chain containing all defined delete subcommands. */
40 
41 extern struct cmd_list_element *deletelist;
42 
43 /* Chain containing all defined detach subcommands. */
44 
45 extern struct cmd_list_element *detachlist;
46 
47 /* Chain containing all defined kill subcommands. */
48 
49 extern struct cmd_list_element *killlist;
50 
51 /* Chain containing all defined stop subcommands. */
52 
53 extern struct cmd_list_element *stoplist;
54 
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 
79 /* Chain containing all defined maintenance subcommands. */
80 
81 extern struct cmd_list_element *maintenancelist;
82 
83 /* Chain containing all defined "maintenance info" subcommands. */
84 
86 
87 /* Chain containing all defined "maintenance print" subcommands. */
88 
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 
109 int is_complete_command (struct cmd_list_element *cmd);
110 
111 /* Exported to gdb/main.c */
112 
113 extern void cd_command (const char *, int);
114 
115 /* Exported to gdb/top.c and gdb/main.c */
116 
117 extern void quit_command (const char *, int);
118 
119 extern void source_script (const char *, int);
120 
121 /* Exported to objfiles.c. */
122 
123 /* The script that was opened. */
125 {
128 
130  gdb::unique_xmalloc_ptr<char> &&full_path_)
131  : stream (std::move (stream_)),
132  full_path (std::move (full_path_))
133  {
134  }
135 };
136 
138  find_and_open_script (const char *file, int search_path);
139 
140 /* Command tracing state. */
141 
142 extern int source_verbose;
143 extern int trace_commands;
144 
145 #endif /* !defined (CLI_CMDS_H) */
struct cmd_list_element * maintenanceinfolist
Definition: cli-cmds.c:139
struct cmd_list_element * stoplist
Definition: cli-cmds.c:95
struct cmd_list_element * enablelist
Definition: cli-cmds.c:87
struct cmd_list_element * setdebuglist
Definition: cli-cmds.c:153
struct cmd_list_element * maintenanceprintlist
Definition: cli-cmds.c:143
int source_verbose
Definition: cli-cmds.c:163
struct cmd_list_element * detachlist
Definition: cli-cmds.c:103
void init_cmd_lists(void)
Definition: cli-cmds.c:1606
struct cmd_list_element * deletelist
Definition: cli-cmds.c:99
struct cmd_list_element * showprintlist
Definition: cli-cmds.c:151
struct cmd_list_element * showlist
Definition: cli-cmds.c:119
gdb_file_up stream
Definition: cli-cmds.h:126
void quit_command(const char *, int)
Definition: cli-cmds.c:331
struct cmd_list_element * showhistlist
Definition: cli-cmds.c:127
struct cmd_list_element * cmdlist
Definition: cli-cmds.c:79
std::unique_ptr< FILE, gdb_file_deleter > gdb_file_up
Definition: filestuff.h:59
std::unique_ptr< T, xfree_deleter< T > > unique_xmalloc_ptr
int trace_commands
Definition: cli-cmds.c:164
struct cmd_list_element * setprintlist
Definition: cli-cmds.c:149
struct cmd_list_element * maintenancelist
Definition: cli-cmds.c:135
struct cmd_list_element * killlist
Definition: cli-cmds.c:107
struct cmd_list_element * showchecklist
Definition: cli-cmds.c:159
struct cmd_list_element * sethistlist
Definition: cli-cmds.c:123
struct cmd_list_element * infolist
Definition: cli-cmds.c:83
struct cmd_list_element * setlist
Definition: cli-cmds.c:111
struct cmd_list_element * disablelist
Definition: cli-cmds.c:91
void init_cli_cmds(void)
Definition: cli-cmds.c:1933
void source_script(const char *, int)
Definition: cli-cmds.c:612
struct cmd_list_element * showdebuglist
Definition: cli-cmds.c:155
void cd_command(const char *, int)
Definition: cli-cmds.c:372
open_script(gdb_file_up &&stream_, gdb::unique_xmalloc_ptr< char > &&full_path_)
Definition: cli-cmds.h:129
gdb::unique_xmalloc_ptr< char > full_path
Definition: cli-cmds.h:127
struct cmd_list_element * setchecklist
Definition: cli-cmds.c:157
struct cmd_list_element * unsethistlist
Definition: cli-cmds.c:131
int is_complete_command(struct cmd_list_element *cmd)
Definition: cli-cmds.c:310
gdb::optional< open_script > find_and_open_script(const char *file, int search_path)
Definition: cli-cmds.c:496
struct cmd_list_element * unsetlist
Definition: cli-cmds.c:115