xref: /dflybsd-src/contrib/gdb-7/gdb/command.h (revision 5796c8dc12c637f18a1740c26afd8d40ffa9b719)
1*5796c8dcSSimon Schubert /* Header file for command-reading library command.c.
2*5796c8dcSSimon Schubert 
3*5796c8dcSSimon Schubert    Copyright (C) 1986, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000,
4*5796c8dcSSimon Schubert    2002, 2004, 2007, 2008, 2009 Free Software Foundation, Inc.
5*5796c8dcSSimon Schubert 
6*5796c8dcSSimon Schubert    This program is free software; you can redistribute it and/or modify
7*5796c8dcSSimon Schubert    it under the terms of the GNU General Public License as published by
8*5796c8dcSSimon Schubert    the Free Software Foundation; either version 3 of the License, or
9*5796c8dcSSimon Schubert    (at your option) any later version.
10*5796c8dcSSimon Schubert 
11*5796c8dcSSimon Schubert    This program is distributed in the hope that it will be useful,
12*5796c8dcSSimon Schubert    but WITHOUT ANY WARRANTY; without even the implied warranty of
13*5796c8dcSSimon Schubert    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14*5796c8dcSSimon Schubert    GNU General Public License for more details.
15*5796c8dcSSimon Schubert 
16*5796c8dcSSimon Schubert    You should have received a copy of the GNU General Public License
17*5796c8dcSSimon Schubert    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
18*5796c8dcSSimon Schubert 
19*5796c8dcSSimon Schubert #if !defined (COMMAND_H)
20*5796c8dcSSimon Schubert #define COMMAND_H 1
21*5796c8dcSSimon Schubert 
22*5796c8dcSSimon Schubert /* Command classes are top-level categories into which commands are broken
23*5796c8dcSSimon Schubert    down for "help" purposes.
24*5796c8dcSSimon Schubert    Notes on classes: class_alias is for alias commands which are not
25*5796c8dcSSimon Schubert    abbreviations of the original command.  class-pseudo is for
26*5796c8dcSSimon Schubert    commands which are not really commands nor help topics ("stop").  */
27*5796c8dcSSimon Schubert 
28*5796c8dcSSimon Schubert enum command_class
29*5796c8dcSSimon Schubert {
30*5796c8dcSSimon Schubert   /* Special args to help_list */
31*5796c8dcSSimon Schubert   class_deprecated = -3, all_classes = -2, all_commands = -1,
32*5796c8dcSSimon Schubert   /* Classes of commands */
33*5796c8dcSSimon Schubert   no_class = -1, class_run = 0, class_vars, class_stack,
34*5796c8dcSSimon Schubert   class_files, class_support, class_info, class_breakpoint, class_trace,
35*5796c8dcSSimon Schubert   class_alias, class_obscure, class_user, class_maintenance,
36*5796c8dcSSimon Schubert   class_pseudo, class_tui, class_xdb
37*5796c8dcSSimon Schubert };
38*5796c8dcSSimon Schubert 
39*5796c8dcSSimon Schubert /* FIXME: cagney/2002-03-17: Once cmd_type() has been removed, ``enum
40*5796c8dcSSimon Schubert    cmd_types'' can be moved from "command.h" to "cli-decode.h".  */
41*5796c8dcSSimon Schubert /* Not a set/show command.  Note that some commands which begin with
42*5796c8dcSSimon Schubert    "set" or "show" might be in this category, if their syntax does
43*5796c8dcSSimon Schubert    not fall into one of the following categories.  */
44*5796c8dcSSimon Schubert typedef enum cmd_types
45*5796c8dcSSimon Schubert   {
46*5796c8dcSSimon Schubert     not_set_cmd,
47*5796c8dcSSimon Schubert     set_cmd,
48*5796c8dcSSimon Schubert     show_cmd
49*5796c8dcSSimon Schubert   }
50*5796c8dcSSimon Schubert cmd_types;
51*5796c8dcSSimon Schubert 
52*5796c8dcSSimon Schubert /* Types of "set" or "show" command.  */
53*5796c8dcSSimon Schubert typedef enum var_types
54*5796c8dcSSimon Schubert   {
55*5796c8dcSSimon Schubert     /* "on" or "off".  *VAR is an integer which is nonzero for on,
56*5796c8dcSSimon Schubert        zero for off.  */
57*5796c8dcSSimon Schubert     var_boolean,
58*5796c8dcSSimon Schubert 
59*5796c8dcSSimon Schubert     /* "on" / "true" / "enable" or "off" / "false" / "disable" or
60*5796c8dcSSimon Schubert        "auto.  *VAR is an ``enum auto_boolean''.  NOTE: In general a
61*5796c8dcSSimon Schubert        custom show command will need to be implemented - one that for
62*5796c8dcSSimon Schubert        "auto" prints both the "auto" and the current auto-selected
63*5796c8dcSSimon Schubert        value. */
64*5796c8dcSSimon Schubert     var_auto_boolean,
65*5796c8dcSSimon Schubert 
66*5796c8dcSSimon Schubert     /* Unsigned Integer.  *VAR is an unsigned int.  The user can type 0
67*5796c8dcSSimon Schubert        to mean "unlimited", which is stored in *VAR as UINT_MAX.  */
68*5796c8dcSSimon Schubert     var_uinteger,
69*5796c8dcSSimon Schubert 
70*5796c8dcSSimon Schubert     /* Like var_uinteger but signed.  *VAR is an int.  The user can type 0
71*5796c8dcSSimon Schubert        to mean "unlimited", which is stored in *VAR as INT_MAX.  */
72*5796c8dcSSimon Schubert     var_integer,
73*5796c8dcSSimon Schubert 
74*5796c8dcSSimon Schubert     /* String which the user enters with escapes (e.g. the user types \n and
75*5796c8dcSSimon Schubert        it is a real newline in the stored string).
76*5796c8dcSSimon Schubert        *VAR is a malloc'd string, or NULL if the string is empty.  */
77*5796c8dcSSimon Schubert     var_string,
78*5796c8dcSSimon Schubert     /* String which stores what the user types verbatim.
79*5796c8dcSSimon Schubert        *VAR is a malloc'd string, or NULL if the string is empty.  */
80*5796c8dcSSimon Schubert     var_string_noescape,
81*5796c8dcSSimon Schubert     /* String which stores a filename.  (*VAR) is a malloc'd string,
82*5796c8dcSSimon Schubert        or "" if the string was empty.  */
83*5796c8dcSSimon Schubert     var_optional_filename,
84*5796c8dcSSimon Schubert     /* String which stores a filename.  (*VAR) is a malloc'd
85*5796c8dcSSimon Schubert        string.  */
86*5796c8dcSSimon Schubert     var_filename,
87*5796c8dcSSimon Schubert     /* ZeroableInteger.  *VAR is an int.  Like Unsigned Integer except
88*5796c8dcSSimon Schubert        that zero really means zero.  */
89*5796c8dcSSimon Schubert     var_zinteger,
90*5796c8dcSSimon Schubert     /* ZeroableUnsignedInteger.  *VAR is an unsigned int.  Zero really
91*5796c8dcSSimon Schubert        means zero.  */
92*5796c8dcSSimon Schubert     var_zuinteger,
93*5796c8dcSSimon Schubert     /* Enumerated type.  Can only have one of the specified values.  *VAR is a
94*5796c8dcSSimon Schubert        char pointer to the name of the element that we find.  */
95*5796c8dcSSimon Schubert     var_enum
96*5796c8dcSSimon Schubert   }
97*5796c8dcSSimon Schubert var_types;
98*5796c8dcSSimon Schubert 
99*5796c8dcSSimon Schubert /* This structure records one command'd definition.  */
100*5796c8dcSSimon Schubert struct cmd_list_element;
101*5796c8dcSSimon Schubert 
102*5796c8dcSSimon Schubert /* Forward-declarations of the entry-points of cli/cli-decode.c.  */
103*5796c8dcSSimon Schubert 
104*5796c8dcSSimon Schubert extern struct cmd_list_element *add_cmd (char *, enum command_class,
105*5796c8dcSSimon Schubert 					 void (*fun) (char *, int), char *,
106*5796c8dcSSimon Schubert 					 struct cmd_list_element **);
107*5796c8dcSSimon Schubert 
108*5796c8dcSSimon Schubert extern struct cmd_list_element *add_alias_cmd (char *, char *,
109*5796c8dcSSimon Schubert 					       enum command_class, int,
110*5796c8dcSSimon Schubert 					       struct cmd_list_element **);
111*5796c8dcSSimon Schubert 
112*5796c8dcSSimon Schubert extern struct cmd_list_element *add_prefix_cmd (char *, enum command_class,
113*5796c8dcSSimon Schubert 						void (*fun) (char *, int),
114*5796c8dcSSimon Schubert 						char *,
115*5796c8dcSSimon Schubert 						struct cmd_list_element **,
116*5796c8dcSSimon Schubert 						char *, int,
117*5796c8dcSSimon Schubert 						struct cmd_list_element **);
118*5796c8dcSSimon Schubert 
119*5796c8dcSSimon Schubert extern struct cmd_list_element *add_abbrev_prefix_cmd (char *,
120*5796c8dcSSimon Schubert 						       enum command_class,
121*5796c8dcSSimon Schubert 						       void (*fun) (char *,
122*5796c8dcSSimon Schubert 								    int),
123*5796c8dcSSimon Schubert 						       char *,
124*5796c8dcSSimon Schubert 						       struct cmd_list_element
125*5796c8dcSSimon Schubert 						       **, char *, int,
126*5796c8dcSSimon Schubert 						       struct cmd_list_element
127*5796c8dcSSimon Schubert 						       **);
128*5796c8dcSSimon Schubert 
129*5796c8dcSSimon Schubert /* Set the commands corresponding callback.  */
130*5796c8dcSSimon Schubert 
131*5796c8dcSSimon Schubert typedef void cmd_cfunc_ftype (char *args, int from_tty);
132*5796c8dcSSimon Schubert extern void set_cmd_cfunc (struct cmd_list_element *cmd,
133*5796c8dcSSimon Schubert 			   cmd_cfunc_ftype *cfunc);
134*5796c8dcSSimon Schubert 
135*5796c8dcSSimon Schubert typedef void cmd_sfunc_ftype (char *args, int from_tty,
136*5796c8dcSSimon Schubert 			      struct cmd_list_element *c);
137*5796c8dcSSimon Schubert extern void set_cmd_sfunc (struct cmd_list_element *cmd,
138*5796c8dcSSimon Schubert 			   cmd_sfunc_ftype *sfunc);
139*5796c8dcSSimon Schubert 
140*5796c8dcSSimon Schubert extern void set_cmd_completer (struct cmd_list_element *cmd,
141*5796c8dcSSimon Schubert 			       char **(*completer) (struct cmd_list_element *cmd,
142*5796c8dcSSimon Schubert 						    char *text, char *word));
143*5796c8dcSSimon Schubert 
144*5796c8dcSSimon Schubert /* HACK: cagney/2002-02-23: Code, mostly in tracepoints.c, grubs
145*5796c8dcSSimon Schubert    around in cmd objects to test the value of the commands sfunc().  */
146*5796c8dcSSimon Schubert extern int cmd_cfunc_eq (struct cmd_list_element *cmd,
147*5796c8dcSSimon Schubert 			 void (*cfunc) (char *args, int from_tty));
148*5796c8dcSSimon Schubert 
149*5796c8dcSSimon Schubert /* Each command object has a local context attached to it. .  */
150*5796c8dcSSimon Schubert extern void set_cmd_context (struct cmd_list_element *cmd, void *context);
151*5796c8dcSSimon Schubert extern void *get_cmd_context (struct cmd_list_element *cmd);
152*5796c8dcSSimon Schubert 
153*5796c8dcSSimon Schubert 
154*5796c8dcSSimon Schubert /* Execute CMD's pre/post hook.  Throw an error if the command fails.
155*5796c8dcSSimon Schubert    If already executing this pre/post hook, or there is no pre/post
156*5796c8dcSSimon Schubert    hook, the call is silently ignored.  */
157*5796c8dcSSimon Schubert extern void execute_cmd_pre_hook (struct cmd_list_element *cmd);
158*5796c8dcSSimon Schubert extern void execute_cmd_post_hook (struct cmd_list_element *cmd);
159*5796c8dcSSimon Schubert 
160*5796c8dcSSimon Schubert /* Return the type of the command.  */
161*5796c8dcSSimon Schubert extern enum cmd_types cmd_type (struct cmd_list_element *cmd);
162*5796c8dcSSimon Schubert 
163*5796c8dcSSimon Schubert 
164*5796c8dcSSimon Schubert extern struct cmd_list_element *lookup_cmd (char **,
165*5796c8dcSSimon Schubert 					    struct cmd_list_element *, char *,
166*5796c8dcSSimon Schubert 					    int, int);
167*5796c8dcSSimon Schubert 
168*5796c8dcSSimon Schubert extern struct cmd_list_element *lookup_cmd_1 (char **,
169*5796c8dcSSimon Schubert 					      struct cmd_list_element *,
170*5796c8dcSSimon Schubert 					      struct cmd_list_element **,
171*5796c8dcSSimon Schubert 					      int);
172*5796c8dcSSimon Schubert 
173*5796c8dcSSimon Schubert extern struct cmd_list_element *
174*5796c8dcSSimon Schubert   deprecate_cmd (struct cmd_list_element *, char * );
175*5796c8dcSSimon Schubert 
176*5796c8dcSSimon Schubert extern void
177*5796c8dcSSimon Schubert   deprecated_cmd_warning (char **);
178*5796c8dcSSimon Schubert 
179*5796c8dcSSimon Schubert extern int
180*5796c8dcSSimon Schubert   lookup_cmd_composition (char *text,
181*5796c8dcSSimon Schubert                         struct cmd_list_element **alias,
182*5796c8dcSSimon Schubert                         struct cmd_list_element **prefix_cmd,
183*5796c8dcSSimon Schubert                         struct cmd_list_element **cmd);
184*5796c8dcSSimon Schubert 
185*5796c8dcSSimon Schubert extern struct cmd_list_element *add_com (char *, enum command_class,
186*5796c8dcSSimon Schubert 					 void (*fun) (char *, int), char *);
187*5796c8dcSSimon Schubert 
188*5796c8dcSSimon Schubert extern struct cmd_list_element *add_com_alias (char *, char *,
189*5796c8dcSSimon Schubert 					       enum command_class, int);
190*5796c8dcSSimon Schubert 
191*5796c8dcSSimon Schubert extern struct cmd_list_element *add_info (char *, void (*fun) (char *, int),
192*5796c8dcSSimon Schubert 					  char *);
193*5796c8dcSSimon Schubert 
194*5796c8dcSSimon Schubert extern struct cmd_list_element *add_info_alias (char *, char *, int);
195*5796c8dcSSimon Schubert 
196*5796c8dcSSimon Schubert extern char **complete_on_cmdlist (struct cmd_list_element *, char *, char *);
197*5796c8dcSSimon Schubert 
198*5796c8dcSSimon Schubert extern char **complete_on_enum (const char *enumlist[], char *, char *);
199*5796c8dcSSimon Schubert 
200*5796c8dcSSimon Schubert extern void help_cmd (char *, struct ui_file *);
201*5796c8dcSSimon Schubert 
202*5796c8dcSSimon Schubert extern void help_list (struct cmd_list_element *, char *,
203*5796c8dcSSimon Schubert 		       enum command_class, struct ui_file *);
204*5796c8dcSSimon Schubert 
205*5796c8dcSSimon Schubert extern void help_cmd_list (struct cmd_list_element *, enum command_class,
206*5796c8dcSSimon Schubert 			   char *, int, struct ui_file *);
207*5796c8dcSSimon Schubert 
208*5796c8dcSSimon Schubert /* Method for show a set/show variable's VALUE on FILE.  If this
209*5796c8dcSSimon Schubert    method isn't supplied deprecated_show_value_hack() is called (which
210*5796c8dcSSimon Schubert    is not good).  */
211*5796c8dcSSimon Schubert typedef void (show_value_ftype) (struct ui_file *file,
212*5796c8dcSSimon Schubert 				 int from_tty,
213*5796c8dcSSimon Schubert 				 struct cmd_list_element *cmd,
214*5796c8dcSSimon Schubert 				 const char *value);
215*5796c8dcSSimon Schubert /* NOTE: i18n: This function is not i18n friendly.  Callers should
216*5796c8dcSSimon Schubert    instead print the value out directly.  */
217*5796c8dcSSimon Schubert extern show_value_ftype deprecated_show_value_hack;
218*5796c8dcSSimon Schubert 
219*5796c8dcSSimon Schubert extern void add_setshow_enum_cmd (char *name,
220*5796c8dcSSimon Schubert 				  enum command_class class,
221*5796c8dcSSimon Schubert 				  const char *enumlist[],
222*5796c8dcSSimon Schubert 				  const char **var,
223*5796c8dcSSimon Schubert 				  const char *set_doc,
224*5796c8dcSSimon Schubert 				  const char *show_doc,
225*5796c8dcSSimon Schubert 				  const char *help_doc,
226*5796c8dcSSimon Schubert 				  cmd_sfunc_ftype *set_func,
227*5796c8dcSSimon Schubert 				  show_value_ftype *show_func,
228*5796c8dcSSimon Schubert 				  struct cmd_list_element **set_list,
229*5796c8dcSSimon Schubert 				  struct cmd_list_element **show_list);
230*5796c8dcSSimon Schubert 
231*5796c8dcSSimon Schubert extern void add_setshow_auto_boolean_cmd (char *name,
232*5796c8dcSSimon Schubert 					  enum command_class class,
233*5796c8dcSSimon Schubert 					  enum auto_boolean *var,
234*5796c8dcSSimon Schubert 					  const char *set_doc,
235*5796c8dcSSimon Schubert 					  const char *show_doc,
236*5796c8dcSSimon Schubert 					  const char *help_doc,
237*5796c8dcSSimon Schubert 					  cmd_sfunc_ftype *set_func,
238*5796c8dcSSimon Schubert 					  show_value_ftype *show_func,
239*5796c8dcSSimon Schubert 					  struct cmd_list_element **set_list,
240*5796c8dcSSimon Schubert 					  struct cmd_list_element **show_list);
241*5796c8dcSSimon Schubert 
242*5796c8dcSSimon Schubert extern void add_setshow_boolean_cmd (char *name,
243*5796c8dcSSimon Schubert 				     enum command_class class,
244*5796c8dcSSimon Schubert 				     int *var,
245*5796c8dcSSimon Schubert 				     const char *set_doc, const char *show_doc,
246*5796c8dcSSimon Schubert 				     const char *help_doc,
247*5796c8dcSSimon Schubert 				     cmd_sfunc_ftype *set_func,
248*5796c8dcSSimon Schubert 				     show_value_ftype *show_func,
249*5796c8dcSSimon Schubert 				     struct cmd_list_element **set_list,
250*5796c8dcSSimon Schubert 				     struct cmd_list_element **show_list);
251*5796c8dcSSimon Schubert 
252*5796c8dcSSimon Schubert extern void add_setshow_filename_cmd (char *name,
253*5796c8dcSSimon Schubert 				      enum command_class class,
254*5796c8dcSSimon Schubert 				      char **var,
255*5796c8dcSSimon Schubert 				      const char *set_doc,
256*5796c8dcSSimon Schubert 				      const char *show_doc,
257*5796c8dcSSimon Schubert 				      const char *help_doc,
258*5796c8dcSSimon Schubert 				      cmd_sfunc_ftype *set_func,
259*5796c8dcSSimon Schubert 				      show_value_ftype *show_func,
260*5796c8dcSSimon Schubert 				      struct cmd_list_element **set_list,
261*5796c8dcSSimon Schubert 				      struct cmd_list_element **show_list);
262*5796c8dcSSimon Schubert 
263*5796c8dcSSimon Schubert extern void add_setshow_string_cmd (char *name,
264*5796c8dcSSimon Schubert 				    enum command_class class,
265*5796c8dcSSimon Schubert 				    char **var,
266*5796c8dcSSimon Schubert 				    const char *set_doc,
267*5796c8dcSSimon Schubert 				    const char *show_doc,
268*5796c8dcSSimon Schubert 				    const char *help_doc,
269*5796c8dcSSimon Schubert 				    cmd_sfunc_ftype *set_func,
270*5796c8dcSSimon Schubert 				    show_value_ftype *show_func,
271*5796c8dcSSimon Schubert 				    struct cmd_list_element **set_list,
272*5796c8dcSSimon Schubert 				    struct cmd_list_element **show_list);
273*5796c8dcSSimon Schubert 
274*5796c8dcSSimon Schubert extern void add_setshow_string_noescape_cmd (char *name,
275*5796c8dcSSimon Schubert 					     enum command_class class,
276*5796c8dcSSimon Schubert 					     char **var,
277*5796c8dcSSimon Schubert 					     const char *set_doc,
278*5796c8dcSSimon Schubert 					     const char *show_doc,
279*5796c8dcSSimon Schubert 					     const char *help_doc,
280*5796c8dcSSimon Schubert 					     cmd_sfunc_ftype *set_func,
281*5796c8dcSSimon Schubert 					     show_value_ftype *show_func,
282*5796c8dcSSimon Schubert 					     struct cmd_list_element **set_list,
283*5796c8dcSSimon Schubert 					     struct cmd_list_element **show_list);
284*5796c8dcSSimon Schubert 
285*5796c8dcSSimon Schubert extern void add_setshow_optional_filename_cmd (char *name,
286*5796c8dcSSimon Schubert 					       enum command_class class,
287*5796c8dcSSimon Schubert 					       char **var,
288*5796c8dcSSimon Schubert 					       const char *set_doc,
289*5796c8dcSSimon Schubert 					       const char *show_doc,
290*5796c8dcSSimon Schubert 					       const char *help_doc,
291*5796c8dcSSimon Schubert 					       cmd_sfunc_ftype *set_func,
292*5796c8dcSSimon Schubert 					       show_value_ftype *show_func,
293*5796c8dcSSimon Schubert 					       struct cmd_list_element **set_list,
294*5796c8dcSSimon Schubert 					       struct cmd_list_element **show_list);
295*5796c8dcSSimon Schubert 
296*5796c8dcSSimon Schubert extern void add_setshow_integer_cmd (char *name,
297*5796c8dcSSimon Schubert 				     enum command_class class,
298*5796c8dcSSimon Schubert 				     int *var,
299*5796c8dcSSimon Schubert 				     const char *set_doc,
300*5796c8dcSSimon Schubert 				     const char *show_doc,
301*5796c8dcSSimon Schubert 				     const char *help_doc,
302*5796c8dcSSimon Schubert 				     cmd_sfunc_ftype *set_func,
303*5796c8dcSSimon Schubert 				     show_value_ftype *show_func,
304*5796c8dcSSimon Schubert 				     struct cmd_list_element **set_list,
305*5796c8dcSSimon Schubert 				     struct cmd_list_element **show_list);
306*5796c8dcSSimon Schubert 
307*5796c8dcSSimon Schubert extern void add_setshow_uinteger_cmd (char *name,
308*5796c8dcSSimon Schubert 				      enum command_class class,
309*5796c8dcSSimon Schubert 				      unsigned int *var,
310*5796c8dcSSimon Schubert 				      const char *set_doc,
311*5796c8dcSSimon Schubert 				      const char *show_doc,
312*5796c8dcSSimon Schubert 				      const char *help_doc,
313*5796c8dcSSimon Schubert 				      cmd_sfunc_ftype *set_func,
314*5796c8dcSSimon Schubert 				      show_value_ftype *show_func,
315*5796c8dcSSimon Schubert 				      struct cmd_list_element **set_list,
316*5796c8dcSSimon Schubert 				      struct cmd_list_element **show_list);
317*5796c8dcSSimon Schubert 
318*5796c8dcSSimon Schubert extern void add_setshow_zinteger_cmd (char *name,
319*5796c8dcSSimon Schubert 				      enum command_class class,
320*5796c8dcSSimon Schubert 				      int *var,
321*5796c8dcSSimon Schubert 				      const char *set_doc,
322*5796c8dcSSimon Schubert 				      const char *show_doc,
323*5796c8dcSSimon Schubert 				      const char *help_doc,
324*5796c8dcSSimon Schubert 				      cmd_sfunc_ftype *set_func,
325*5796c8dcSSimon Schubert 				      show_value_ftype *show_func,
326*5796c8dcSSimon Schubert 				      struct cmd_list_element **set_list,
327*5796c8dcSSimon Schubert 				      struct cmd_list_element **show_list);
328*5796c8dcSSimon Schubert 
329*5796c8dcSSimon Schubert extern void add_setshow_zuinteger_cmd (char *name,
330*5796c8dcSSimon Schubert 				       enum command_class class,
331*5796c8dcSSimon Schubert 				       unsigned int *var,
332*5796c8dcSSimon Schubert 				       const char *set_doc,
333*5796c8dcSSimon Schubert 				       const char *show_doc,
334*5796c8dcSSimon Schubert 				       const char *help_doc,
335*5796c8dcSSimon Schubert 				       cmd_sfunc_ftype *set_func,
336*5796c8dcSSimon Schubert 				       show_value_ftype *show_func,
337*5796c8dcSSimon Schubert 				       struct cmd_list_element **set_list,
338*5796c8dcSSimon Schubert 				       struct cmd_list_element **show_list);
339*5796c8dcSSimon Schubert 
340*5796c8dcSSimon Schubert /* Do a "show" command for each thing on a command list.  */
341*5796c8dcSSimon Schubert 
342*5796c8dcSSimon Schubert extern void cmd_show_list (struct cmd_list_element *, int, char *);
343*5796c8dcSSimon Schubert 
344*5796c8dcSSimon Schubert extern NORETURN void error_no_arg (char *) ATTR_NORETURN;
345*5796c8dcSSimon Schubert 
346*5796c8dcSSimon Schubert extern void dont_repeat (void);
347*5796c8dcSSimon Schubert 
348*5796c8dcSSimon Schubert /* Used to mark commands that don't do anything.  If we just leave the
349*5796c8dcSSimon Schubert    function field NULL, the command is interpreted as a help topic, or
350*5796c8dcSSimon Schubert    as a class of commands.  */
351*5796c8dcSSimon Schubert 
352*5796c8dcSSimon Schubert extern void not_just_help_class_command (char *, int);
353*5796c8dcSSimon Schubert 
354*5796c8dcSSimon Schubert /* check function pointer */
355*5796c8dcSSimon Schubert extern int cmd_func_p (struct cmd_list_element *cmd);
356*5796c8dcSSimon Schubert 
357*5796c8dcSSimon Schubert /* call the command function */
358*5796c8dcSSimon Schubert extern void cmd_func (struct cmd_list_element *cmd, char *args, int from_tty);
359*5796c8dcSSimon Schubert 
360*5796c8dcSSimon Schubert #endif /* !defined (COMMAND_H) */
361