summaryrefslogtreecommitdiff
path: root/gdb/cli
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2005-02-21 06:21:09 +0000
committerAndrew Cagney <cagney@redhat.com>2005-02-21 06:21:09 +0000
commit725b374aef285a27d3509c527f2e630d1d6c620b (patch)
treea3366baad263c7b055434dacc05c49c007ae2279 /gdb/cli
parent313436a0ac6c585fa80c8ba40b031156377ddf79 (diff)
downloadgdb-725b374aef285a27d3509c527f2e630d1d6c620b.tar.gz
2005-02-21 Andrew Cagney <cagney@gnu.org>
Add more uses of add_setshow_string_cmd, add_setshow_integer_cmd, and add_setshow_string_noescape_cmd. * cli/cli-setshow.c (deprecated_show_value_hack): Do not print a NULL command's value. * kod.c, language.c, ocd.c, remote-e7000.c, remote-mips.c: Update. * remote-sds.c, remote.c, symfile.c, top.c: Update.
Diffstat (limited to 'gdb/cli')
-rw-r--r--gdb/cli/cli-setshow.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c
index 15c664d0134..4b01e62e16e 100644
--- a/gdb/cli/cli-setshow.c
+++ b/gdb/cli/cli-setshow.c
@@ -96,6 +96,9 @@ deprecated_show_value_hack (struct ui_file *ignore_file,
struct cmd_list_element *c,
const char *value)
{
+ /* If there's no command or value, don't try to print it out. */
+ if (c == NULL || value == NULL)
+ return;
/* Print doc minus "show" at start. */
print_doc_line (gdb_stdout, c->doc + 5);
switch (c->var_type)