diff --git a/gdb/cli/cli-logging.c b/gdb/cli/cli-logging.c index d659a0dc2ef..193a87331db 100644 --- a/gdb/cli/cli-logging.c +++ b/gdb/cli/cli-logging.c @@ -56,10 +56,10 @@ static void show_logging_overwrite (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Whether logging overwrites or " - "appends to the log file is %s.\n"), - value); + if (logging_overwrite) + fprintf_filtered (file, _("on: Logging overwrites the log file.\n")); + else + fprintf_filtered (file, _("off: Logging appends to the log file.\n")); } /* Value as configured by the user. */ @@ -77,7 +77,25 @@ static void show_logging_redirect (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("The logging output mode is %s.\n"), value); + if (logging_redirect) + fprintf_filtered(file, _("on: Output will go only to the log file.\n")); + else + fprintf_filtered + (file, + _("off: Output will go to both the screen and the log file.\n")); +} + +static void +show_logging_debug_redirect (struct ui_file *file, int from_tty, + struct cmd_list_element *c, const char *value) +{ + if (debug_redirect) + fprintf_filtered(file, + _("on: Debug output will go only to the log file.\n")); + else + fprintf_filtered + (file, + _("off: Debug output will go to both the screen and the log file.\n")); } /* If we've pushed output files, close them and pop them. */ @@ -181,9 +199,9 @@ show_logging_enabled (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { if (logging_enabled) - fprintf_filtered (file, _("Logging is enabled.\n")); + fprintf_unfiltered (_("on: Logging is enabled.\n")); else - fprintf_filtered (file, _("Logging is disabled.\n")); + fprintf_unfiltered (_("off: Logging is disabled.\n")); } void _initialize_cli_logging (); @@ -226,7 +244,7 @@ Show the logging debug output mode."), _("\ If debug redirect is off, debug will go to both the screen and the log file.\n\ If debug redirect is on, debug will go only to the log file."), set_logging_redirect, - show_logging_redirect, + show_logging_debug_redirect, &set_logging_cmdlist, &show_logging_cmdlist); /* Set/show logging file. */