GDB (xrefs)
Loading...
Searching...
No Matches
Functions | Variables
cli-logging.c File Reference
#include "defs.h"
#include "gdbcmd.h"
#include "ui-out.h"
#include "interps.h"
#include "cli/cli-style.h"
#include "cli/cli-decode.h"

Go to the source code of this file.

Functions

static void show_logging_filename (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void maybe_warn_already_logging ()
 
static void set_logging_overwrite (const char *args, int from_tty, struct cmd_list_element *c)
 
static void show_logging_overwrite (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 void show_logging_redirect (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void show_logging_debug_redirect (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void pop_output_files (void)
 
static void handle_redirections (int from_tty)
 
static void set_logging_on (const char *args, int from_tty)
 
static void set_logging_off (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_enabled (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
void _initialize_cli_logging ()
 

Variables

static std::string saved_filename
 
static std::string logging_filename = "gdb.txt"
 
static bool logging_overwrite
 
static bool logging_redirect
 
static bool debug_redirect
 
static bool logging_enabled
 

Function Documentation

◆ _initialize_cli_logging()

void _initialize_cli_logging ( )

Definition at line 208 of file cli-logging.c.

Referenced by initialize_all_files().

◆ handle_redirections()

static void handle_redirections ( int from_tty)
static

◆ maybe_warn_already_logging()

static void maybe_warn_already_logging ( )
static

Definition at line 41 of file cli-logging.c.

References saved_filename.

Referenced by set_logging_overwrite(), and set_logging_redirect().

◆ pop_output_files()

static void pop_output_files ( void )
static

Definition at line 102 of file cli-logging.c.

References current_interp_set_logging(), and current_uiout.

Referenced by set_logging_off().

◆ set_logging_enabled()

static void set_logging_enabled ( const char * args,
int from_tty,
struct cmd_list_element * c )
static

Definition at line 187 of file cli-logging.c.

References logging_enabled, set_logging_off(), and set_logging_on().

◆ set_logging_off()

static void set_logging_off ( const char * args,
int from_tty )
static

Definition at line 172 of file cli-logging.c.

References gdb_printf(), pop_output_files(), and saved_filename.

Referenced by set_logging_enabled().

◆ set_logging_on()

static void set_logging_on ( const char * args,
int from_tty )
static

Definition at line 161 of file cli-logging.c.

References handle_redirections(), and logging_filename.

Referenced by set_logging_enabled().

◆ set_logging_overwrite()

static void set_logging_overwrite ( const char * args,
int from_tty,
struct cmd_list_element * c )
static

Definition at line 49 of file cli-logging.c.

References maybe_warn_already_logging().

◆ set_logging_redirect()

static void set_logging_redirect ( const char * args,
int from_tty,
struct cmd_list_element * c )
static

Definition at line 70 of file cli-logging.c.

References maybe_warn_already_logging().

◆ show_logging_debug_redirect()

static void show_logging_debug_redirect ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 89 of file cli-logging.c.

References debug_redirect, and gdb_printf().

◆ show_logging_enabled()

static void show_logging_enabled ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 197 of file cli-logging.c.

References gdb_printf(), and logging_enabled.

◆ show_logging_filename()

static void show_logging_filename ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

◆ show_logging_overwrite()

static void show_logging_overwrite ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 56 of file cli-logging.c.

References gdb_printf(), and logging_overwrite.

◆ show_logging_redirect()

static void show_logging_redirect ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 77 of file cli-logging.c.

References gdb_printf(), and logging_redirect.

Variable Documentation

◆ debug_redirect

bool debug_redirect
static

◆ logging_enabled

bool logging_enabled
static

Definition at line 184 of file cli-logging.c.

Referenced by set_logging_enabled(), and show_logging_enabled().

◆ logging_filename

std::string logging_filename = "gdb.txt"
static

Definition at line 29 of file cli-logging.c.

Referenced by handle_redirections(), and set_logging_on().

◆ logging_overwrite

bool logging_overwrite
static

Definition at line 38 of file cli-logging.c.

Referenced by handle_redirections(), and show_logging_overwrite().

◆ logging_redirect

bool logging_redirect
static

◆ saved_filename

std::string saved_filename
static

Definition at line 27 of file cli-logging.c.

Referenced by handle_redirections(), maybe_warn_already_logging(), and set_logging_off().