GDB (xrefs)
Macros | Functions | Variables
/tmp/gdb-8.1/gdb/record.c File Reference
#include "defs.h"
#include "gdbcmd.h"
#include "completer.h"
#include "record.h"
#include "observer.h"
#include "inferior.h"
#include "common/common-utils.h"
#include "cli/cli-utils.h"
#include "disasm.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, const char *args, 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 set_record_command (const char *args, int from_tty)
 
static void show_record_command (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 int 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 (void)
 

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
 
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:
fprintf_unfiltered (gdb_stdlog, "record: " msg "\n", ##args)
unsigned int record_debug
Definition: record.c:33
#define gdb_stdlog
Definition: utils.h:349

Definition at line 56 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 ( void  )

◆ 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 398 of file record.c.

References record_goto().

Referenced by _initialize_record().

◆ cmd_record_goto_begin()

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

Definition at line 406 of file record.c.

References _, error(), require_record_target(), and target_goto_record_begin().

Referenced by _initialize_record().

◆ cmd_record_goto_end()

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

Definition at line 418 of file record.c.

References _, error(), require_record_target(), and target_goto_record_end().

Referenced by _initialize_record().

◆ 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

◆ cmd_record_start()

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

Definition at line 267 of file record.c.

References execute_command().

Referenced by _initialize_record().

◆ 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 543 of file record.c.

References gdb_assert, INT_MAX, size, and UINT_MAX.

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 int get_call_history_modifiers ( const char **  arg)
static

◆ get_context_size()

static int get_context_size ( const char **  arg)
static

Definition at line 451 of file record.c.

References _, error(), and skip_spaces().

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 430 of file record.c.

References _, error(), skip_spaces(), and strtoulst().

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 469 of file record.c.

References _, and error().

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,
const char *  args,
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 86 of file record.c.

References _, error(), and find_record_target().

Referenced by record_btrace_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 97 of file record.c.

References _, error(), and 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 155 of file record.c.

References DEBUG, target_ops::to_shortname, and target_ops::to_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_command()

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

Definition at line 320 of file record.c.

References _, all_commands, gdb_stdout, help_list(), printf_unfiltered(), and set_record_cmdlist.

Referenced by _initialize_record().

◆ 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_command()

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

Definition at line 330 of file record.c.

References cmd_show_list(), and show_record_cmdlist.

Referenced by _initialize_record().

◆ 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 257 of file record.c.

References _, and fprintf_filtered().

Referenced by _initialize_record().

◆ validate_history_size()

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

Definition at line 741 of file record.c.

References _, error(), INT_MAX, and UINT_MAX.

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 54 of file record.c.

Referenced by _initialize_record().

◆ record_call_history_size

unsigned int record_call_history_size = 10
static

◆ record_call_history_size_setshow_var

unsigned int record_call_history_size_setshow_var
static

Definition at line 48 of file record.c.

Referenced by _initialize_record(), and set_record_call_history_size().

◆ record_cmdlist

struct cmd_list_element* record_cmdlist = NULL

Definition at line 50 of file record.c.

Referenced by _initialize_record(), _initialize_record_btrace(), and _initialize_record_full().

◆ record_debug

unsigned int record_debug = 0

◆ record_goto_cmdlist

struct cmd_list_element* record_goto_cmdlist = NULL

Definition at line 51 of file record.c.

Referenced by _initialize_record().

◆ record_insn_history_size

unsigned int record_insn_history_size = 10
static

◆ record_insn_history_size_setshow_var

unsigned int record_insn_history_size_setshow_var
static

Definition at line 41 of file record.c.

Referenced by _initialize_record(), and set_record_insn_history_size().

◆ set_record_cmdlist

struct cmd_list_element* set_record_cmdlist = NULL

◆ show_record_cmdlist

struct cmd_list_element* show_record_cmdlist = NULL