GDB (xrefs)
Loading...
Searching...
No Matches
Macros | Functions | Variables
record.c File Reference
#include "defs.h"
#include "gdbcmd.h"
#include "completer.h"
#include "record.h"
#include "observable.h"
#include "inferior.h"
#include "gdbsupport/common-utils.h"
#include "cli/cli-utils.h"
#include "disasm.h"
#include "interps.h"
#include <ctype.h>

Go to the source code of this file.

Macros

#define DEBUG(msg, args...)
 

Functions

struct target_opsfind_record_target (void)
 
static struct target_opsrequire_record_target (void)
 
void record_preopen (void)
 
void record_start (const char *method, const char *format, int from_tty)
 
void record_stop (int from_tty)
 
int record_read_memory (struct gdbarch *gdbarch, CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
 
static void record_stop (struct target_ops *t)
 
static void record_unpush (struct target_ops *t)
 
void record_disconnect (struct target_ops *t, const char *args, int from_tty)
 
void record_detach (struct target_ops *t, inferior *inf, int from_tty)
 
void record_mourn_inferior (struct target_ops *t)
 
void record_kill (struct target_ops *t)
 
int record_check_stopped_by_breakpoint (const address_space *aspace, CORE_ADDR pc, enum target_stop_reason *reason)
 
static void show_record_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void cmd_record_start (const char *args, int from_tty)
 
static void cmd_record_delete (const char *args, int from_tty)
 
static void cmd_record_stop (const char *args, int from_tty)
 
static void info_record_command (const char *args, int from_tty)
 
static void cmd_record_save (const char *args, int from_tty)
 
void record_goto (const char *arg)
 
static void cmd_record_goto (const char *arg, int from_tty)
 
static void cmd_record_goto_begin (const char *arg, int from_tty)
 
static void cmd_record_goto_end (const char *arg, int from_tty)
 
static ULONGEST get_insn_number (const char **arg)
 
static int get_context_size (const char **arg)
 
static void no_chunk (const char *arg)
 
static gdb_disassembly_flags get_insn_history_modifiers (const char **arg)
 
static int command_size_to_target_size (unsigned int size)
 
static void cmd_record_insn_history (const char *arg, int from_tty)
 
static record_print_flags get_call_history_modifiers (const char **arg)
 
static void cmd_record_call_history (const char *arg, int from_tty)
 
static void validate_history_size (unsigned int *command_var, unsigned int *setting)
 
static void set_record_insn_history_size (const char *args, int from_tty, struct cmd_list_element *c)
 
static void set_record_call_history_size (const char *args, int from_tty, struct cmd_list_element *c)
 
void _initialize_record ()
 

Variables

unsigned int record_debug = 0
 
static unsigned int record_insn_history_size = 10
 
static unsigned int record_insn_history_size_setshow_var
 
static unsigned int record_call_history_size = 10
 
static unsigned int record_call_history_size_setshow_var
 
struct cmd_list_elementrecord_cmdlist = NULL
 
static struct cmd_list_elementrecord_goto_cmdlist = NULL
 
struct cmd_list_elementset_record_cmdlist = NULL
 
struct cmd_list_elementshow_record_cmdlist = NULL
 
struct cmd_list_elementinfo_record_cmdlist = NULL
 

Macro Definition Documentation

◆ DEBUG

#define DEBUG ( msg,
args... )
Value:
if (record_debug) \
gdb_printf (gdb_stdlog, "record: " msg "\n", ##args)
unsigned int record_debug
Definition record.c:34
#define gdb_stdlog
Definition utils.h:190

Definition at line 57 of file record.c.

Referenced by record_detach(), record_disconnect(), record_kill(), record_mourn_inferior(), record_read_memory(), record_stop(), and record_unpush().

Function Documentation

◆ _initialize_record()

void _initialize_record ( )

Definition at line 764 of file record.c.

Referenced by initialize_all_files().

◆ cmd_record_call_history()

static void cmd_record_call_history ( const char * arg,
int from_tty )
static

◆ cmd_record_delete()

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

◆ cmd_record_goto()

static void cmd_record_goto ( const char * arg,
int from_tty )
static

Definition at line 382 of file record.c.

References record_goto().

◆ cmd_record_goto_begin()

static void cmd_record_goto_begin ( const char * arg,
int from_tty )
static

Definition at line 390 of file record.c.

References require_record_target(), and target_goto_record_begin().

◆ cmd_record_goto_end()

static void cmd_record_goto_end ( const char * arg,
int from_tty )
static

Definition at line 402 of file record.c.

References require_record_target(), and target_goto_record_end().

◆ cmd_record_insn_history()

static void cmd_record_insn_history ( const char * arg,
int from_tty )
static

◆ cmd_record_save()

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

Definition at line 340 of file record.c.

References inferior_ptid, require_record_target(), and target_save_record().

◆ cmd_record_start()

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

Definition at line 268 of file record.c.

References execute_command().

◆ cmd_record_stop()

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

◆ command_size_to_target_size()

static int command_size_to_target_size ( unsigned int size)
static

Definition at line 530 of file record.c.

References size.

Referenced by cmd_record_call_history(), and cmd_record_insn_history().

◆ find_record_target()

struct target_ops * find_record_target ( void )

◆ get_call_history_modifiers()

static record_print_flags get_call_history_modifiers ( const char ** arg)
static

◆ get_context_size()

static int get_context_size ( const char ** arg)
static

Definition at line 435 of file record.c.

Referenced by cmd_record_call_history(), and cmd_record_insn_history().

◆ get_insn_history_modifiers()

static gdb_disassembly_flags get_insn_history_modifiers ( const char ** arg)
static

◆ get_insn_number()

static ULONGEST get_insn_number ( const char ** arg)
static

Definition at line 414 of file record.c.

Referenced by cmd_record_call_history(), and cmd_record_insn_history().

◆ info_record_command()

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

◆ no_chunk()

static void no_chunk ( const char * arg)
static

Definition at line 453 of file record.c.

Referenced by cmd_record_call_history(), and cmd_record_insn_history().

◆ record_check_stopped_by_breakpoint()

int record_check_stopped_by_breakpoint ( const address_space * aspace,
CORE_ADDR pc,
enum target_stop_reason * reason )

◆ record_detach()

void record_detach ( struct target_ops * t,
inferior * inf,
int from_tty )

◆ record_disconnect()

void record_disconnect ( struct target_ops * t,
const char * args,
int from_tty )

◆ record_goto()

void record_goto ( const char * arg)

◆ record_kill()

void record_kill ( struct target_ops * t)

◆ record_mourn_inferior()

void record_mourn_inferior ( struct target_ops * t)

◆ record_preopen()

void record_preopen ( void )

Definition at line 87 of file record.c.

References find_record_target().

Referenced by record_btrace_target_open(), and record_full_open().

◆ record_read_memory()

int record_read_memory ( struct gdbarch * gdbarch,
CORE_ADDR memaddr,
gdb_byte * myaddr,
ssize_t len )

◆ record_start()

void record_start ( const char * method,
const char * format,
int from_tty )

Definition at line 98 of file record.c.

References execute_command_to_string().

Referenced by gdbpy_start_recording().

◆ record_stop() [1/2]

void record_stop ( int from_tty)

◆ record_stop() [2/2]

static void record_stop ( struct target_ops * t)
static

Definition at line 156 of file record.c.

References DEBUG, target_ops::shortname(), and target_ops::stop_recording().

◆ record_unpush()

static void record_unpush ( struct target_ops * t)
static

◆ require_record_target()

static struct target_ops * require_record_target ( void )
static

◆ set_record_call_history_size()

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

◆ set_record_insn_history_size()

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

◆ show_record_debug()

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

Definition at line 258 of file record.c.

References gdb_printf().

◆ validate_history_size()

static void validate_history_size ( unsigned int * command_var,
unsigned int * setting )
static

Definition at line 723 of file record.c.

Referenced by set_record_call_history_size(), and set_record_insn_history_size().

Variable Documentation

◆ info_record_cmdlist

struct cmd_list_element* info_record_cmdlist = NULL

Definition at line 55 of file record.c.

◆ record_call_history_size

unsigned int record_call_history_size = 10
static

Definition at line 45 of file record.c.

Referenced by cmd_record_call_history(), and set_record_call_history_size().

◆ record_call_history_size_setshow_var

unsigned int record_call_history_size_setshow_var
static

Definition at line 49 of file record.c.

Referenced by set_record_call_history_size().

◆ record_cmdlist

struct cmd_list_element* record_cmdlist = NULL

Definition at line 51 of file record.c.

◆ record_debug

unsigned int record_debug = 0

◆ record_goto_cmdlist

struct cmd_list_element* record_goto_cmdlist = NULL
static

Definition at line 52 of file record.c.

◆ record_insn_history_size

unsigned int record_insn_history_size = 10
static

Definition at line 37 of file record.c.

Referenced by cmd_record_insn_history(), and set_record_insn_history_size().

◆ record_insn_history_size_setshow_var

unsigned int record_insn_history_size_setshow_var
static

Definition at line 42 of file record.c.

Referenced by set_record_insn_history_size().

◆ set_record_cmdlist

struct cmd_list_element* set_record_cmdlist = NULL

Definition at line 53 of file record.c.

◆ show_record_cmdlist

struct cmd_list_element* show_record_cmdlist = NULL

Definition at line 54 of file record.c.