GDB (xrefs)
|
#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.
Defines | |
#define | DEBUG(msg, args...) |
Functions | |
static struct target_ops * | find_record_target (void) |
static struct target_ops * | require_record_target (void) |
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, char *args, int from_tty) |
void | record_detach (struct target_ops *t, char *args, int from_tty) |
void | record_mourn_inferior (struct target_ops *t) |
void | record_kill (struct target_ops *t) |
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 (char *args, int from_tty) |
static void | cmd_record_delete (char *args, int from_tty) |
static void | cmd_record_stop (char *args, int from_tty) |
static void | set_record_command (char *args, int from_tty) |
static void | show_record_command (char *args, int from_tty) |
static void | info_record_command (char *args, int from_tty) |
static void | cmd_record_save (char *args, int from_tty) |
void | cmd_record_goto (char *arg, int from_tty) |
static void | cmd_record_goto_begin (char *arg, int from_tty) |
static void | cmd_record_goto_end (char *arg, int from_tty) |
static ULONGEST | get_insn_number (char **arg) |
static int | get_context_size (char **arg) |
static void | no_chunk (char *arg) |
static int | get_insn_history_modifiers (char **arg) |
static int | command_size_to_target_size (unsigned int size) |
static void | cmd_record_insn_history (char *arg, int from_tty) |
static int | get_call_history_modifiers (char **arg) |
static void | cmd_record_call_history (char *arg, int from_tty) |
static void | validate_history_size (unsigned int *command_var, unsigned int *setting) |
static void | set_record_insn_history_size (char *args, int from_tty, struct cmd_list_element *c) |
static void | set_record_call_history_size (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_element * | record_cmdlist = NULL |
struct cmd_list_element * | record_goto_cmdlist = NULL |
struct cmd_list_element * | set_record_cmdlist = NULL |
struct cmd_list_element * | show_record_cmdlist = NULL |
struct cmd_list_element * | info_record_cmdlist = NULL |
initialize_file_ftype | _initialize_record |
#define DEBUG | ( | msg, | |
args... | |||
) |
if (record_debug) \ fprintf_unfiltered (gdb_stdlog, "record: " msg "\n", ##args)
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().
void _initialize_record | ( | void | ) |
Definition at line 706 of file record.c.
References _, _initialize_record, add_alias_cmd(), add_cmd(), add_com_alias(), add_prefix_cmd(), add_setshow_uinteger_cmd(), add_setshow_zuinteger_cmd(), class_obscure, class_support, cmd_record_call_history(), cmd_record_delete(), cmd_record_goto(), cmd_record_goto_begin(), cmd_record_goto_end(), cmd_record_insn_history(), cmd_record_save(), cmd_record_start(), cmd_record_stop(), cmdlist, info_record_command(), infolist, no_class, record_call_history_size, record_call_history_size_setshow_var, record_debug, record_insn_history_size, record_insn_history_size_setshow_var, set_record_call_history_size(), set_record_command(), set_record_insn_history_size(), setdebuglist, setlist, show_record_command(), show_record_debug(), showdebuglist, and showlist.
static void cmd_record_call_history | ( | char * | arg, |
int | from_tty | ||
) | [static] |
Definition at line 595 of file record.c.
References command_size_to_target_size(), dont_repeat(), flags, get_call_history_modifiers(), get_context_size(), get_insn_number(), no_chunk(), record_call_history_size, require_record_target(), size, skip_spaces(), target_call_history(), target_call_history_from(), target_call_history_range(), and ULONGEST.
Referenced by _initialize_record().
static void cmd_record_delete | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 210 of file record.c.
References _, printf_unfiltered(), query(), require_record_target(), target_delete_record(), target_record_is_replaying(), and target_supports_delete_record().
Referenced by _initialize_record().
void cmd_record_goto | ( | char * | arg, |
int | from_tty | ||
) |
Definition at line 316 of file record.c.
References _, error(), parse_and_eval_long(), require_record_target(), target_goto_record(), and ULONGEST.
Referenced by _initialize_record(), and record_full_goto_bookmark().
static void cmd_record_goto_begin | ( | char * | arg, |
int | from_tty | ||
) | [static] |
Definition at line 332 of file record.c.
References _, error(), require_record_target(), and target_goto_record_begin().
Referenced by _initialize_record().
static void cmd_record_goto_end | ( | char * | arg, |
int | from_tty | ||
) | [static] |
Definition at line 344 of file record.c.
References _, error(), require_record_target(), and target_goto_record_end().
Referenced by _initialize_record().
static void cmd_record_insn_history | ( | char * | arg, |
int | from_tty | ||
) | [static] |
Definition at line 479 of file record.c.
References command_size_to_target_size(), dont_repeat(), flags, get_context_size(), get_insn_history_modifiers(), get_insn_number(), no_chunk(), record_insn_history_size, require_record_target(), size, skip_spaces(), target_insn_history(), target_insn_history_from(), target_insn_history_range(), and ULONGEST.
Referenced by _initialize_record().
static void cmd_record_save | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 291 of file record.c.
References inferior_ptid, ptid_get_pid(), require_record_target(), target_save_record(), and xsnprintf().
Referenced by _initialize_record().
static void cmd_record_start | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 201 of file record.c.
References execute_command().
Referenced by _initialize_record().
static void cmd_record_stop | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 236 of file record.c.
References _, current_inferior(), observer_notify_record_changed(), printf_unfiltered(), record_stop(), record_unpush(), and require_record_target().
Referenced by _initialize_record().
static int command_size_to_target_size | ( | unsigned int | size | ) | [static] |
Definition at line 466 of file record.c.
References gdb_assert, and size.
Referenced by cmd_record_call_history(), and cmd_record_insn_history().
static struct target_ops* find_record_target | ( | void | ) | [static, read] |
Definition at line 63 of file record.c.
References target_ops::beneath, current_target, record_stratum, and target_ops::to_stratum.
Referenced by info_record_command(), and require_record_target().
static int get_call_history_modifiers | ( | char ** | arg | ) | [static] |
Definition at line 544 of file record.c.
References _, error(), RECORD_PRINT_INSN_RANGE, RECORD_PRINT_SRC_LINE, and skip_spaces().
Referenced by cmd_record_call_history().
static int get_context_size | ( | char ** | arg | ) | [static] |
Definition at line 377 of file record.c.
References _, error(), and skip_spaces().
Referenced by cmd_record_call_history(), and cmd_record_insn_history().
static int get_insn_history_modifiers | ( | char ** | arg | ) | [static] |
Definition at line 402 of file record.c.
References _, DISASSEMBLY_FILENAME, DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_OMIT_PC, DISASSEMBLY_RAW_INSN, DISASSEMBLY_SOURCE, error(), and skip_spaces().
Referenced by cmd_record_insn_history().
static ULONGEST get_insn_number | ( | char ** | arg | ) | [static] |
Definition at line 356 of file record.c.
References _, error(), skip_spaces_const(), strtoulst(), and ULONGEST.
Referenced by cmd_record_call_history(), and cmd_record_insn_history().
static void info_record_command | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 272 of file record.c.
References _, find_record_target(), printf_filtered(), target_ops::to_info_record, and target_ops::to_shortname.
Referenced by _initialize_record().
static void no_chunk | ( | char * | arg | ) | [static] |
Definition at line 393 of file record.c.
Referenced by cmd_record_call_history(), and cmd_record_insn_history().
void record_detach | ( | struct target_ops * | t, |
char * | args, | ||
int | from_tty | ||
) |
Definition at line 144 of file record.c.
References DEBUG, gdb_assert, record_stop(), record_stratum, record_unpush(), target_detach(), target_ops::to_shortname, and target_ops::to_stratum.
Referenced by init_record_btrace_ops(), and init_record_full_ops().
void record_disconnect | ( | struct target_ops * | t, |
char * | args, | ||
int | from_tty | ||
) |
Definition at line 129 of file record.c.
References DEBUG, gdb_assert, record_stop(), record_stratum, record_unpush(), target_disconnect(), target_ops::to_shortname, and target_ops::to_stratum.
Referenced by init_record_btrace_ops(), and init_record_full_ops().
void record_kill | ( | struct target_ops * | t | ) |
Definition at line 175 of file record.c.
References DEBUG, gdb_assert, record_stratum, record_unpush(), target_kill(), target_ops::to_shortname, and target_ops::to_stratum.
Referenced by init_record_btrace_ops(), and init_record_full_ops().
void record_mourn_inferior | ( | struct target_ops * | t | ) |
Definition at line 159 of file record.c.
References DEBUG, gdb_assert, record_stratum, record_unpush(), target_mourn_inferior(), target_ops::to_shortname, and target_ops::to_stratum.
Referenced by init_record_btrace_ops(), and init_record_full_ops().
int record_read_memory | ( | struct gdbarch * | gdbarch, |
CORE_ADDR | memaddr, | ||
gdb_byte * | myaddr, | ||
ssize_t | len | ||
) |
Definition at line 92 of file record.c.
References DEBUG, paddress(), and target_read_memory().
Referenced by i386_process_record(), i386_record_lea_modrm_addr(), i386_record_modrm(), record_full_arch_list_add_mem(), and record_full_exec_insn().
static void record_stop | ( | struct target_ops * | t | ) | [static] |
Definition at line 108 of file record.c.
References DEBUG, target_ops::to_shortname, and target_ops::to_stop_recording.
Referenced by cmd_record_stop(), record_detach(), and record_disconnect().
static void record_unpush | ( | struct target_ops * | t | ) | [static] |
Definition at line 119 of file record.c.
References DEBUG, target_ops::to_shortname, and unpush_target().
Referenced by cmd_record_stop(), record_detach(), record_disconnect(), record_kill(), and record_mourn_inferior().
static struct target_ops* require_record_target | ( | void | ) | [static, read] |
Definition at line 77 of file record.c.
References _, error(), and find_record_target().
Referenced by cmd_record_call_history(), cmd_record_delete(), cmd_record_goto(), cmd_record_goto_begin(), cmd_record_goto_end(), cmd_record_insn_history(), cmd_record_save(), and cmd_record_stop().
static void set_record_call_history_size | ( | char * | args, |
int | from_tty, | ||
struct cmd_list_element * | c | ||
) | [static] |
Definition at line 695 of file record.c.
References record_call_history_size, record_call_history_size_setshow_var, and validate_history_size().
Referenced by _initialize_record().
static void set_record_command | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 254 of file record.c.
References _, all_commands, gdb_stdout, help_list(), and printf_unfiltered().
Referenced by _initialize_record().
static void set_record_insn_history_size | ( | char * | args, |
int | from_tty, | ||
struct cmd_list_element * | c | ||
) | [static] |
Definition at line 683 of file record.c.
References record_insn_history_size, record_insn_history_size_setshow_var, and validate_history_size().
Referenced by _initialize_record().
static void show_record_command | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 264 of file record.c.
References cmd_show_list().
Referenced by _initialize_record().
static void show_record_debug | ( | struct ui_file * | file, |
int | from_tty, | ||
struct cmd_list_element * | c, | ||
const char * | value | ||
) | [static] |
Definition at line 191 of file record.c.
References _, and fprintf_filtered().
Referenced by _initialize_record().
static void validate_history_size | ( | unsigned int * | command_var, |
unsigned int * | setting | ||
) | [static] |
Definition at line 663 of file record.c.
Referenced by set_record_call_history_size(), and set_record_insn_history_size().
Referenced by _initialize_record(), and initialize_all_files().
struct cmd_list_element* info_record_cmdlist = NULL |
unsigned int record_call_history_size = 10 [static] |
Definition at line 44 of file record.c.
Referenced by _initialize_record(), cmd_record_call_history(), and set_record_call_history_size().
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().
struct cmd_list_element* record_cmdlist = NULL |
Definition at line 50 of file record.c.
Referenced by _initialize_record_full().
unsigned int record_debug = 0 |
Definition at line 33 of file record.c.
Referenced by _initialize_record(), arm_process_record(), decode_insn(), i386_process_record(), moxie_process_readu(), moxie_process_record(), record_full_arch_list_add(), record_full_arch_list_add_end(), record_full_arch_list_add_mem(), record_full_arch_list_add_reg(), record_full_close(), record_full_core_kill(), record_full_exec_insn(), record_full_get_bookmark(), record_full_goto_bookmark(), record_full_open(), record_full_open_1(), record_full_restore(), record_full_save(), record_full_sig_handler(), record_full_wait_1(), record_full_xfer_partial(), record_linux_msghdr(), record_linux_sockaddr(), and record_linux_system_call().
struct cmd_list_element* record_goto_cmdlist = NULL |
unsigned int record_insn_history_size = 10 [static] |
Definition at line 36 of file record.c.
Referenced by _initialize_record(), cmd_record_insn_history(), and set_record_insn_history_size().
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().
struct cmd_list_element* set_record_cmdlist = NULL |
Definition at line 52 of file record.c.
Referenced by _initialize_record_full().
struct cmd_list_element* show_record_cmdlist = NULL |
Definition at line 53 of file record.c.
Referenced by _initialize_record_full().