xref: /netbsd-src/external/gpl3/gdb.old/dist/gdb/cli/cli-cmds.h (revision 82d56013d7b633d116a93943de88e08335357a7c)
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 "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 
85 extern struct cmd_list_element *maintenanceinfolist;
86 
87 /* Chain containing all defined "maintenance print" subcommands.  */
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 
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.  */
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);
139 
140 /* Command tracing state.  */
141 
142 extern int source_verbose;
143 extern int trace_commands;
144 
145 #endif /* CLI_CLI_CMDS_H */
146