aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli/cli-setshow.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/cli/cli-setshow.c')
-rw-r--r--gdb/cli/cli-setshow.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c
index c676f3b..6acdd91 100644
--- a/gdb/cli/cli-setshow.c
+++ b/gdb/cli/cli-setshow.c
@@ -434,18 +434,21 @@ cmd_show_list (struct cmd_list_element *list, int from_tty, char *prefix)
}
else
{
- struct cleanup *option_chain
- = make_cleanup_ui_out_tuple_begin_end (uiout, "option");
-
- ui_out_text (uiout, prefix);
- ui_out_field_string (uiout, "name", list->name);
- ui_out_text (uiout, ": ");
- if (list->type == show_cmd)
- do_setshow_command ((char *) NULL, from_tty, list);
- else
- cmd_func (list, NULL, from_tty);
- /* Close the tuple. */
- do_cleanups (option_chain);
+ if (list->class != no_set_class)
+ {
+ struct cleanup *option_chain
+ = make_cleanup_ui_out_tuple_begin_end (uiout, "option");
+
+ ui_out_text (uiout, prefix);
+ ui_out_field_string (uiout, "name", list->name);
+ ui_out_text (uiout, ": ");
+ if (list->type == show_cmd)
+ do_setshow_command ((char *) NULL, from_tty, list);
+ else
+ cmd_func (list, NULL, from_tty);
+ /* Close the tuple. */
+ do_cleanups (option_chain);
+ }
}
}
/* Close the tuple. */