42 warning (
_(
"Currently logging to %s. Turn the logging off and on to " 58 _(
"Whether logging overwrites or " 59 "appends to the log file is %s.\n"),
98 return logfile.release ();
103 logfile.get (),
true);
153 const char *rest = args;
180 "Usage: set logging on [FILENAME]\n" 182 " set logging file FILENAME\n" 183 " set logging overwrite [on|off]\n" 184 " set logging redirect [on|off]\n"));
214 _(
"Set logging options"), &set_logging_cmdlist,
217 _(
"Show logging options"), &show_logging_cmdlist,
220 Set whether logging overwrites or appends to the log file."),
_(
"\ 221 Show whether logging overwrites or appends to the log file."),
_(
"\ 222 If set, logging overrides the log file."),
225 &set_logging_cmdlist, &show_logging_cmdlist);
227 Set the logging output mode."),
_(
"\ 228 Show the logging output mode."),
_(
"\ 229 If redirect is off, output will go to both the screen and the log file.\n\ 230 If redirect is on, output will go only to the log file."),
233 &set_logging_cmdlist, &show_logging_cmdlist);
235 Set the current logfile."),
_(
"\ 236 Show the current logfile."),
_(
"\ 237 The logfile is used when directing GDB's output."),
240 &set_logging_cmdlist, &show_logging_cmdlist);
242 _(
"Enable logging."), &set_logging_cmdlist);
244 _(
"Disable logging."), &set_logging_cmdlist);
static void pop_output_files(void)
void add_setshow_filename_cmd(const char *name, enum command_class theclass, char **var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_const_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
static char * saved_filename
std::unique_ptr< ui_file > ui_file_up
void warning(const char *fmt,...)
struct cmd_list_element * add_cmd(const char *name, enum command_class theclass, const char *doc, struct cmd_list_element **list)
static void maybe_warn_already_logging()
void _initialize_cli_logging(void)
ui_file * make_logging_output(ui_file *curr_output, ui_file_up logfile, bool logging_redirect)
static void show_logging_command(const char *args, int from_tty)
struct cmd_list_element * add_prefix_cmd(const char *name, enum command_class theclass, cmd_const_cfunc_ftype *fun, const char *doc, struct cmd_list_element **prefixlist, const char *prefixname, int allow_unknown, struct cmd_list_element **list)
struct cmd_list_element * setlist
static void show_logging_redirect(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static int logging_redirect
void fprintf_filtered(struct ui_file *stream, const char *format,...)
void fprintf_unfiltered(struct ui_file *stream, const char *format,...)
struct cmd_list_element * showlist
std::unique_ptr< stdio_file > stdio_file_up
static void show_logging_filename(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void show_logging_overwrite(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
void printf_unfiltered(const char *format,...)
static void handle_redirections(int from_tty)
static void set_logging_command(const char *args, int from_tty)
static char * logging_filename
static void set_logging_on(const char *args, int from_tty)
void void void void void void void void void perror_with_name(const char *string) ATTRIBUTE_NORETURN
static void set_logging_redirect(const char *args, int from_tty, struct cmd_list_element *c)
void add_setshow_boolean_cmd(const char *name, enum command_class theclass, int *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_const_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
static int logging_overwrite
static void set_logging_off(const char *args, int from_tty)
void current_interp_set_logging(ui_file_up logfile, bool logging_redirect)
static void set_logging_overwrite(const char *args, int from_tty, struct cmd_list_element *c)