diff options
author | Tom Tromey <tromey@redhat.com> | 2009-08-07 20:44:15 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2009-08-07 20:44:15 +0000 |
commit | 6cc0b2563e4aae5352e78e09370a0ba59feb26fc (patch) | |
tree | dde8ea69a789d37c058a30f675835b136e3d7cfc /gdb/cli | |
parent | cf2a6cfab69c160b11b0bc1a4b00e58ade531ee9 (diff) | |
download | gdb-6cc0b2563e4aae5352e78e09370a0ba59feb26fc.zip gdb-6cc0b2563e4aae5352e78e09370a0ba59feb26fc.tar.gz gdb-6cc0b2563e4aae5352e78e09370a0ba59feb26fc.tar.bz2 |
PR gdb/8869:
* language.c (language_completer): New function.
(range_or_type_completer): New function.
(case_completer): New function.
(_initialize_language): Set completers.
* cli/cli-decode.c (add_setshow_string_cmd): Return the "set"
command.
(add_setshow_string_noescape_cmd): Likewise.
(add_setshow_integer_cmd): Likewise.
(add_setshow_uinteger_cmd): Likewise.
(add_setshow_zinteger_cmd): Likewise.
(add_setshow_zuinteger_cmd): Likewise.
* command.h (add_setshow_string_cmd,
add_setshow_string_noescape_cmd, add_setshow_uinteger_cmd,
add_setshow_zinteger_cmd, add_setshow_zuinteger_cmd): Update.
Diffstat (limited to 'gdb/cli')
-rw-r--r-- | gdb/cli/cli-decode.c | 54 |
1 files changed, 36 insertions, 18 deletions
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c index 3e4f6f5..b547ba9 100644 --- a/gdb/cli/cli-decode.c +++ b/gdb/cli/cli-decode.c @@ -494,8 +494,9 @@ add_setshow_filename_cmd (char *name, enum command_class class, } /* Add element named NAME to both the set and show command LISTs (the - list for set/show or some sublist thereof). */ -void + list for set/show or some sublist thereof). Return the new "set" + command. */ +struct cmd_list_element * add_setshow_string_cmd (char *name, enum command_class class, char **var, const char *set_doc, const char *show_doc, @@ -505,16 +506,19 @@ add_setshow_string_cmd (char *name, enum command_class class, struct cmd_list_element **set_list, struct cmd_list_element **show_list) { + struct cmd_list_element *cmd; add_setshow_cmd_full (name, class, var_string, var, set_doc, show_doc, help_doc, set_func, show_func, set_list, show_list, - NULL, NULL); + &cmd, NULL); + return cmd; } /* Add element named NAME to both the set and show command LISTs (the - list for set/show or some sublist thereof). */ -void + list for set/show or some sublist thereof). Return the new "set" + command. */ +struct cmd_list_element * add_setshow_string_noescape_cmd (char *name, enum command_class class, char **var, const char *set_doc, const char *show_doc, @@ -524,11 +528,13 @@ add_setshow_string_noescape_cmd (char *name, enum command_class class, struct cmd_list_element **set_list, struct cmd_list_element **show_list) { + struct cmd_list_element *cmd; add_setshow_cmd_full (name, class, var_string_noescape, var, set_doc, show_doc, help_doc, set_func, show_func, set_list, show_list, - NULL, NULL); + &cmd, NULL); + return cmd; } /* Add element named NAME to both the set and show command LISTs (the @@ -558,8 +564,9 @@ add_setshow_optional_filename_cmd (char *name, enum command_class class, /* Add element named NAME to both the set and show command LISTs (the list for set/show or some sublist thereof). CLASS is as in add_cmd. VAR is address of the variable which will contain the - value. SET_DOC and SHOW_DOC are the documentation strings. */ -void + value. SET_DOC and SHOW_DOC are the documentation strings. Return + the new "set" command. */ +struct cmd_list_element * add_setshow_integer_cmd (char *name, enum command_class class, int *var, const char *set_doc, const char *show_doc, @@ -569,18 +576,21 @@ add_setshow_integer_cmd (char *name, enum command_class class, struct cmd_list_element **set_list, struct cmd_list_element **show_list) { + struct cmd_list_element *cmd; add_setshow_cmd_full (name, class, var_integer, var, set_doc, show_doc, help_doc, set_func, show_func, set_list, show_list, - NULL, NULL); + &cmd, NULL); + return cmd; } /* Add element named NAME to both the set and show command LISTs (the list for set/show or some sublist thereof). CLASS is as in add_cmd. VAR is address of the variable which will contain the - value. SET_DOC and SHOW_DOC are the documentation strings. */ -void + value. SET_DOC and SHOW_DOC are the documentation strings. Return + the new "set" command. */ +struct cmd_list_element * add_setshow_uinteger_cmd (char *name, enum command_class class, unsigned int *var, const char *set_doc, const char *show_doc, @@ -590,18 +600,21 @@ add_setshow_uinteger_cmd (char *name, enum command_class class, struct cmd_list_element **set_list, struct cmd_list_element **show_list) { + struct cmd_list_element *cmd; add_setshow_cmd_full (name, class, var_uinteger, var, set_doc, show_doc, help_doc, set_func, show_func, set_list, show_list, - NULL, NULL); + &cmd, NULL); + return cmd; } /* Add element named NAME to both the set and show command LISTs (the list for set/show or some sublist thereof). CLASS is as in add_cmd. VAR is address of the variable which will contain the - value. SET_DOC and SHOW_DOC are the documentation strings. */ -void + value. SET_DOC and SHOW_DOC are the documentation strings. Return + the new "set" command. */ +struct cmd_list_element * add_setshow_zinteger_cmd (char *name, enum command_class class, int *var, const char *set_doc, const char *show_doc, @@ -611,18 +624,21 @@ add_setshow_zinteger_cmd (char *name, enum command_class class, struct cmd_list_element **set_list, struct cmd_list_element **show_list) { + struct cmd_list_element *cmd; add_setshow_cmd_full (name, class, var_zinteger, var, set_doc, show_doc, help_doc, set_func, show_func, set_list, show_list, - NULL, NULL); + &cmd, NULL); + return cmd; } /* Add element named NAME to both the set and show command LISTs (the list for set/show or some sublist thereof). CLASS is as in add_cmd. VAR is address of the variable which will contain the - value. SET_DOC and SHOW_DOC are the documentation strings. */ -void + value. SET_DOC and SHOW_DOC are the documentation strings. Return + the new "set" command. */ +struct cmd_list_element * add_setshow_zuinteger_cmd (char *name, enum command_class class, unsigned int *var, const char *set_doc, const char *show_doc, @@ -632,11 +648,13 @@ add_setshow_zuinteger_cmd (char *name, enum command_class class, struct cmd_list_element **set_list, struct cmd_list_element **show_list) { + struct cmd_list_element *cmd; add_setshow_cmd_full (name, class, var_zuinteger, var, set_doc, show_doc, help_doc, set_func, show_func, set_list, show_list, - NULL, NULL); + &cmd, NULL); + return cmd; } /* Remove the command named NAME from the command list. Return the |