aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli/cli-decode.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-01-14 21:05:07 +0000
committerTom Tromey <tromey@redhat.com>2013-01-14 21:05:07 +0000
commit44478ab3404a5416c1864f8b47ad28eaca7bb0d9 (patch)
tree19712603f7ece0901405ea9f0598eff0b3f172dc /gdb/cli/cli-decode.c
parent06d66ee9d97cf451db4bdd7952eca099bc171706 (diff)
downloadgdb-44478ab3404a5416c1864f8b47ad28eaca7bb0d9.zip
gdb-44478ab3404a5416c1864f8b47ad28eaca7bb0d9.tar.gz
gdb-44478ab3404a5416c1864f8b47ad28eaca7bb0d9.tar.bz2
* cli/cli-decode.c (add_setshow_string_noescape_cmd): Return the
set command. * command.h (add_setshow_string_noescape_cmd): Update. * corefile.c (set_gnutarget_command): Remove trailing whitespace. (complete_set_gnutarget): New function. (_initialize_core): Set the "set gnutarget" completer. gdb/testsuite * gdb.base/completion.exp: Add "set gnutarget" test.
Diffstat (limited to 'gdb/cli/cli-decode.c')
-rw-r--r--gdb/cli/cli-decode.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index 758b0ff..27d94bb 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -597,7 +597,7 @@ add_setshow_string_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
+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,
@@ -607,11 +607,14 @@ 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 *set_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);
+ &set_cmd, NULL);
+ return set_cmd;
}
/* Add element named NAME to both the set and show command LISTs (the