From be7d7357efe8cad63c8920b7fa69f6d2324d6fa5 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Fri, 30 Jul 2004 17:55:47 +0000 Subject: 2004-07-30 Andrew Cagney * complaints.c (_initialize_complaints): Pass NULL to add_setshow_zinteger_cmd for help_doc. * cli/cli-decode.c (add_setshow_cmd_full): Handle a NULL help_doc. --- gdb/cli/cli-decode.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'gdb/cli/cli-decode.c') diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c index d908cf5..cf008eb 100644 --- a/gdb/cli/cli-decode.c +++ b/gdb/cli/cli-decode.c @@ -340,8 +340,19 @@ add_setshow_cmd_full (char *name, { struct cmd_list_element *set; struct cmd_list_element *show; - char *full_set_doc = xstrprintf ("%s\n%s", set_doc, help_doc); - char *full_show_doc = xstrprintf ("%s\n%s", show_doc, help_doc); + char *full_set_doc; + char *full_show_doc; + + if (help_doc != NULL) + { + full_set_doc = xstrprintf ("%s\n%s", set_doc, help_doc); + full_show_doc = xstrprintf ("%s\n%s", show_doc, help_doc); + } + else + { + full_set_doc = xstrdup (set_doc); + full_show_doc = xstrdup (show_doc); + } set = add_set_or_show_cmd (name, set_cmd, class, var_type, var, full_set_doc, set_list); if (set_func != NULL) -- cgit v1.1