34 gdb_printf (file, _(
"The current logfile is \"%ps\".\n"),
44 warning (_(
"Currently logging to %s. Turn the logging off and on to "
60 gdb_printf (file, _(
"on: Logging overwrites the log file.\n"));
62 gdb_printf (file, _(
"off: Logging appends to the log file.\n"));
81 gdb_printf (file, _(
"on: Output will go only to the log file.\n"));
85 _(
"off: Output will go to both the screen and the log file.\n"));
93 gdb_printf (file, _(
"on: Debug output will go only to the log file.\n"));
97 _(
"off: Debug output will go to both the screen and the log file.\n"));
124 perror_with_name (_(
"set logging"));
140 gdb_printf (
"Redirecting debug output to %s.\n",
163 const char *rest = args;
201 gdb_printf (file, _(
"on: Logging is enabled.\n"));
203 gdb_printf (file, _(
"off: Logging is disabled.\n"));
214 _(
"Set logging options."),
215 _(
"Show logging options."),
216 &set_logging_cmdlist, &show_logging_cmdlist,
221Set whether logging overwrites or appends to the log file."), _(
"\
222Show whether logging overwrites or appends to the log file."), _(
"\
223If set, logging overwrites the log file."),
226 &set_logging_cmdlist, &show_logging_cmdlist);
230Set the logging output mode."), _(
"\
231Show the logging output mode."), _(
"\
232If redirect is off, output will go to both the screen and the log file.\n\
233If redirect is on, output will go only to the log file."),
236 &set_logging_cmdlist, &show_logging_cmdlist);
241Set the logging debug output mode."), _(
"\
242Show the logging debug output mode."), _(
"\
243If debug redirect is off, debug will go to both the screen and the log file.\n\
244If debug redirect is on, debug will go only to the log file."),
247 &set_logging_cmdlist, &show_logging_cmdlist);
251Set the current logfile."), _(
"\
252Show the current logfile."), _(
"\
253The logfile is used when directing GDB's output."),
256 &set_logging_cmdlist, &show_logging_cmdlist);
261 _(
"Enable logging."),
262 _(
"Show whether logging is enabled."),
263 _(
"When on, enable logging."),
266 &set_logging_cmdlist, &show_logging_cmdlist);
271 false, &set_logging_cmdlist);
272 deprecate_cmd (set_logging_on_cmd,
"set logging enabled on");
278 false, &set_logging_cmdlist);
279 deprecate_cmd (set_logging_off_cmd,
"set logging enabled off");
ui_file_style style() const
struct cmd_list_element * showlist
struct cmd_list_element * setlist
set_show_commands add_setshow_filename_cmd(const char *name, enum command_class theclass, std::string *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_func_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
struct cmd_list_element * add_alias_cmd(const char *name, cmd_list_element *target, enum command_class theclass, int abbrev_flag, struct cmd_list_element **list)
struct cmd_list_element * deprecate_cmd(struct cmd_list_element *cmd, const char *replacement)
set_show_commands add_setshow_prefix_cmd(const char *name, command_class theclass, const char *set_doc, const char *show_doc, cmd_list_element **set_subcommands_list, cmd_list_element **show_subcommands_list, cmd_list_element **set_list, cmd_list_element **show_list)
set_show_commands add_setshow_boolean_cmd(const char *name, enum command_class theclass, bool *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_func_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
static void show_logging_enabled(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static bool debug_redirect
static void show_logging_overwrite(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void maybe_warn_already_logging()
static bool logging_redirect
static void show_logging_debug_redirect(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void set_logging_redirect(const char *args, int from_tty, struct cmd_list_element *c)
static bool logging_enabled
static std::string saved_filename
static void show_logging_redirect(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static bool logging_overwrite
static void pop_output_files(void)
static void set_logging_off(const char *args, int from_tty)
static void set_logging_overwrite(const char *args, int from_tty, struct cmd_list_element *c)
static void handle_redirections(int from_tty)
static void set_logging_on(const char *args, int from_tty)
static void set_logging_enabled(const char *args, int from_tty, struct cmd_list_element *c)
static void show_logging_filename(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
void _initialize_cli_logging()
static std::string logging_filename
cli_style_option file_name_style
void current_interp_set_logging(ui_file_up logfile, bool logging_redirect, bool debug_redirect)
std::unique_ptr< stdio_file > stdio_file_up
static styled_string_s * styled_string(const ui_file_style &style, const char *str, styled_string_s &&tmp={})
void gdb_printf(struct ui_file *stream, const char *format,...)