summaryrefslogtreecommitdiff
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.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c
index 73e47a4348f..8f84345a0b0 100644
--- a/gdb/cli/cli-setshow.c
+++ b/gdb/cli/cli-setshow.c
@@ -337,6 +337,14 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c)
if (ui_out_is_mi_like_p (uiout))
ui_out_field_stream (uiout, "value", stb);
+ else if (c->fprint_setshow != NULL)
+ {
+ long length;
+ char *value = ui_file_xstrdup (stb->stream, &length);
+ make_cleanup (xfree, value);
+ c->fprint_setshow (c, gdb_stdout, value);
+ fprintf_filtered (gdb_stdout, "\n");
+ }
else
{
/* Print doc minus "show" at start. */