aboutsummaryrefslogtreecommitdiff
path: root/gdb/command.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2005-02-21 03:25:56 +0000
committerAndrew Cagney <cagney@redhat.com>2005-02-21 03:25:56 +0000
commitb4b4ac0b71ae756aa805f15a6f9b0c5b79d8f398 (patch)
tree51cb257042efabc97dc1b938400f93dc4b095103 /gdb/command.h
parentac4528d236f87f0ca5a76199a2455f12101ab7f9 (diff)
downloadgdb-b4b4ac0b71ae756aa805f15a6f9b0c5b79d8f398.zip
gdb-b4b4ac0b71ae756aa805f15a6f9b0c5b79d8f398.tar.gz
gdb-b4b4ac0b71ae756aa805f15a6f9b0c5b79d8f398.tar.bz2
2005-02-20 Andrew Cagney <cagney@gnu.org>
* cli/cli-decode.c (add_setshow_optional_filename_cmd): New function. * cli/cli-setshow.c (deprecated_show_value_hack) (do_setshow_command): Handle var_optional_filename. * command.h (enum var_types): Add var_optional_filename. (add_setshow_optional_filename_cmd): Declare. * infcmd.c (notice_args_read): Use.
Diffstat (limited to 'gdb/command.h')
-rw-r--r--gdb/command.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/gdb/command.h b/gdb/command.h
index dcebe49..cace34f 100644
--- a/gdb/command.h
+++ b/gdb/command.h
@@ -80,8 +80,11 @@ typedef enum var_types
/* String which stores what the user types verbatim.
*VAR is a malloc'd string, or NULL if the string is empty. */
var_string_noescape,
- /* String which stores a filename.
- *VAR is a malloc'd string, or NULL if the string is empty. */
+ /* String which stores a filename. (*VAR) is a malloc'd string,
+ or "" if the string was empty. */
+ var_optional_filename,
+ /* String which stores a filename. (*VAR) is a malloc'd
+ string. */
var_filename,
/* ZeroableInteger. *VAR is an int. Like Unsigned Integer except
that zero really means zero. */
@@ -301,6 +304,17 @@ extern void add_setshow_string_noescape_cmd (char *name,
struct cmd_list_element **set_list,
struct cmd_list_element **show_list);
+extern void add_setshow_optional_filename_cmd (char *name,
+ enum command_class class,
+ char **var,
+ const char *set_doc,
+ const char *show_doc,
+ const char *help_doc,
+ cmd_sfunc_ftype *set_func,
+ show_value_ftype *show_func,
+ struct cmd_list_element **set_list,
+ struct cmd_list_element **show_list);
+
extern void add_setshow_integer_cmd (char *name,
enum command_class class,
unsigned int *var,