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.
Macros | |
#define | DEBUG(msg, args...) |
Functions | |
struct target_ops * | find_record_target (void) |
static struct target_ops * | require_record_target (void) |
void | record_preopen (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, 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 (struct 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 (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 | record_goto (const char *arg) |
static 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... | |||
) |
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 739 of file record.c.
References _, 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_cmd_completer(), 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 |
Definition at line 628 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(), and target_call_history_range().
Referenced by _initialize_record().
|
static |
Definition at line 233 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().
|
static |
Definition at line 354 of file record.c.
References record_goto().
Referenced by _initialize_record().
|
static |
Definition at line 362 of file record.c.
References _, error(), require_record_target(), and target_goto_record_begin().
Referenced by _initialize_record().
|
static |
Definition at line 374 of file record.c.
References _, error(), require_record_target(), and target_goto_record_end().
Referenced by _initialize_record().
|
static |
Definition at line 509 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(), and target_insn_history_range().
Referenced by _initialize_record().
|
static |
Definition at line 313 of file record.c.
References inferior_ptid, ptid_get_pid(), require_record_target(), target_save_record(), and xsnprintf().
Referenced by _initialize_record().
|
static |
Definition at line 224 of file record.c.
References execute_command().
Referenced by _initialize_record().
|
static |
Definition at line 259 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().
Definition at line 496 of file record.c.
References gdb_assert, INT_MAX, size, and UINT_MAX.
Referenced by cmd_record_call_history(), and cmd_record_insn_history().
struct target_ops* find_record_target | ( | void | ) |
Definition at line 63 of file record.c.
References find_target_at(), and record_stratum.
Referenced by info_record_command(), record_full_is_used(), record_preopen(), require_record_target(), and use_displaced_stepping().
|
static |
Definition at line 574 of file record.c.
References _, error(), RECORD_PRINT_INDENT_CALLS, RECORD_PRINT_INSN_RANGE, RECORD_PRINT_SRC_LINE, and skip_spaces().
Referenced by cmd_record_call_history().
|
static |
Definition at line 407 of file record.c.
References _, error(), and skip_spaces().
Referenced by cmd_record_call_history(), and cmd_record_insn_history().
|
static |
Definition at line 432 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 |
Definition at line 386 of file record.c.
References _, error(), skip_spaces_const(), and strtoulst().
Referenced by cmd_record_call_history(), and cmd_record_insn_history().
|
static |
Definition at line 295 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 |
Definition at line 423 of file record.c.
Referenced by cmd_record_call_history(), and cmd_record_insn_history().
int record_check_stopped_by_breakpoint | ( | struct address_space * | aspace, |
CORE_ADDR | pc, | ||
enum target_stop_reason * | reason | ||
) |
Definition at line 195 of file record.c.
References breakpoint_inserted_here_p(), hardware_breakpoint_inserted_here_p(), TARGET_STOPPED_BY_HW_BREAKPOINT, TARGET_STOPPED_BY_NO_REASON, and TARGET_STOPPED_BY_SW_BREAKPOINT.
Referenced by record_btrace_step_thread(), and record_full_wait_1().
void record_detach | ( | struct target_ops * | t, |
const char * | args, | ||
int | from_tty | ||
) |
Definition at line 148 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, |
const char * | args, | ||
int | from_tty | ||
) |
Definition at line 133 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_goto | ( | const char * | arg | ) |
Definition at line 335 of file record.c.
References _, error(), parse_and_eval_long(), require_record_target(), and target_goto_record().
Referenced by cmd_record_goto(), and record_full_goto_bookmark().
void record_kill | ( | struct target_ops * | t | ) |
Definition at line 179 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 163 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().
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().
int record_read_memory | ( | struct gdbarch * | gdbarch, |
CORE_ADDR | memaddr, | ||
gdb_byte * | myaddr, | ||
ssize_t | len | ||
) |
Definition at line 97 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 |
Definition at line 113 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 |
Definition at line 123 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 |
Definition at line 71 of file record.c.
References _, error(), and find_record_target().
Referenced by cmd_record_call_history(), cmd_record_delete(), cmd_record_goto_begin(), cmd_record_goto_end(), cmd_record_insn_history(), cmd_record_save(), cmd_record_stop(), and record_goto().
|
static |
Definition at line 728 of file record.c.
References record_call_history_size, record_call_history_size_setshow_var, and validate_history_size().
Referenced by _initialize_record().
|
static |
Definition at line 277 of file record.c.
References _, all_commands, gdb_stdout, help_list(), and printf_unfiltered().
Referenced by _initialize_record().
|
static |
Definition at line 716 of file record.c.
References record_insn_history_size, record_insn_history_size_setshow_var, and validate_history_size().
Referenced by _initialize_record().
|
static |
Definition at line 287 of file record.c.
References cmd_show_list().
Referenced by _initialize_record().
|
static |
Definition at line 214 of file record.c.
References _, and fprintf_filtered().
Referenced by _initialize_record().
Definition at line 696 of file record.c.
References _, error(), INT_MAX, and UINT_MAX.
Referenced by set_record_call_history_size(), and set_record_insn_history_size().
initialize_file_ftype _initialize_record |
struct cmd_list_element* info_record_cmdlist = NULL |
|
static |
Definition at line 44 of file record.c.
Referenced by _initialize_record(), cmd_record_call_history(), and set_record_call_history_size().
|
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_btrace(), and _initialize_record_full().
unsigned int record_debug = 0 |
Definition at line 33 of file record.c.
Referenced by _initialize_record(), aarch64_record_asimd_load_store(), aarch64_record_data_proc_simd_fp(), aarch64_record_load_store(), arm_process_record(), decode_insn(), ftrace_update_insns(), 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 |
|
static |
Definition at line 36 of file record.c.
Referenced by _initialize_record(), cmd_record_insn_history(), and set_record_insn_history_size().
|
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_btrace(), and _initialize_record_full().
struct cmd_list_element* show_record_cmdlist = NULL |
Definition at line 53 of file record.c.
Referenced by _initialize_record_btrace(), and _initialize_record_full().