34#include "gdbsupport/event-loop.h"
39#include "gdbsupport/gdb_unlinker.h"
40#include "gdbsupport/byte-vector.h"
67#define DEFAULT_RECORD_FULL_INSN_MAX_NUM 200000
69#define RECORD_FULL_IS_REPLAY \
70 (record_full_list->next || ::execution_direction == EXEC_REVERSE)
72#define RECORD_FULL_FILE_MAGIC netorder32(0x20091016)
95 gdb_byte
buf[
sizeof (gdb_byte *)];
106 gdb_byte
buf[2 *
sizeof (gdb_byte *)];
213 = N_(
"Process record and replay target");
215 = N_(
"Log program while executing and replay execution from log.");
227 void close ()
override;
228 void async (
bool)
override;
272 void resume (ptid_t,
int,
enum gdb_signal)
override;
276 void kill ()
override;
281 const gdb_byte *writebuf,
282 ULONGEST offset, ULONGEST len,
283 ULONGEST *xfered_len)
override;
305 void resume (ptid_t,
int,
enum gdb_signal)
override;
307 void kill ()
override;
314 const gdb_byte *writebuf,
315 ULONGEST offset, ULONGEST len,
316 ULONGEST *xfered_len)
override;
571 "Process record: record_full_arch_list_add %s.\n",
572 host_address_to_string (rec));
588static inline gdb_byte *
604 gdb_assert_not_reached (
"unexpected record_full_entry type");
618 "Process record: add register num = %d to "
641 "Process record: add mem addr = %s len = %d to "
672 "Process record: add end to arch list.\n");
691 if (!
yquery (_(
"Do you want to auto delete previous execution "
692 "log entries when record/replay buffer becomes "
693 "full (record full stop-at-limit)?")))
694 error (_(
"Process record: stopped by user."));
750 if (signal == GDB_SIGNAL_0
761 error (_(
"Process record: inferior program stopped."));
763 error (_(
"Process record: failed to record execution log."));
765 catch (
const gdb_exception &ex)
783 enum gdb_signal signal)
789 catch (
const gdb_exception_error &ex)
803scoped_restore_tmpl<int>
826 gdb::byte_vector reg (entry->u.reg.len);
830 "Process record: record_full_reg %s to "
831 "inferior num = %d.\n",
832 host_address_to_string (entry),
844 if (!entry->u.mem.mem_entry_not_accessible)
846 gdb::byte_vector mem (entry->u.mem.len);
850 "Process record: record_full_mem %s to "
851 "inferior addr = %s len = %d.\n",
852 host_address_to_string (entry),
857 entry->u.mem.addr, mem.data (),
859 entry->u.mem.mem_entry_not_accessible = 1;
866 entry->u.mem.mem_entry_not_accessible = 1;
868 warning (_(
"Process record: error writing memory at "
869 "addr = %s len = %d."),
888 entry->u.mem.addr, entry->u.mem.len))
924 for (i = 0; i <
regnum; i ++)
943 error (_(
"Process record: the program is not being run."));
945 error (_(
"Process record target can't debug inferior in non-stop mode "
949 error (_(
"Process record: the current architecture doesn't support "
950 "record function."));
981 NULL,
"record-full");
1103 thread->control.may_range_step = 0;
1143 target_wait_flags options)
1145 scoped_restore restore_operation_disable
1150 "Process record: record_full_wait "
1151 "record_full_resume_step = %d, "
1152 "record_full_resumed = %d, direction=%s\n",
1155 ?
"forward" :
"reverse");
1163 return minus_one_ptid;
1193 "Process record: record_full_wait "
1194 "target beneath not done yet\n");
1206 &&
status->sig () == GDB_SIGNAL_TRAP)
1244 status->set_stopped (GDB_SIGNAL_0);
1267 "Process record: record_full_wait "
1268 "issuing one more step in the "
1269 "target beneath\n");
1292 int continue_flag = 1;
1293 int first_record_full_end = 1;
1300 status->set_stopped (GDB_SIGNAL_0);
1311 "Process record: break at %s.\n",
1338 status->set_no_history ();
1345 status->set_no_history ();
1356 "Process record: record_full_end %s to "
1360 if (first_record_full_end
1366 first_record_full_end = 0;
1379 "Process record: step.\n");
1390 "Process record: break "
1402 "Process record: hit hw "
1427 while (continue_flag);
1433 status->set_stopped (GDB_SIGNAL_INT);
1438 status->set_stopped (GDB_SIGNAL_TRAP);
1441 catch (
const gdb_exception &ex)
1462 target_wait_flags options)
1551 error (_(
"Process record: failed to record execution log."));
1560 error (_(
"Process record: failed to record execution log."));
1566 error (_(
"Process record: failed to record execution log."));
1592 query (_(
"Because GDB is in replay mode, changing the "
1593 "value of a register will make the execution "
1594 "log unusable from this point onward. "
1595 "Change all registers?"));
1598 query (_(
"Because GDB is in replay mode, changing the value "
1599 "of a register will make the execution log unusable "
1600 "from this point onward. Change register %s?"),
1620 error (_(
"Process record canceled the operation."));
1639 const char *annex, gdb_byte *readbuf,
1640 const gdb_byte *writebuf, ULONGEST offset,
1641 ULONGEST len, ULONGEST *xfered_len)
1650 if (!
query (_(
"Because GDB is in replay mode, writing to memory "
1651 "will make the execution log unusable from this "
1652 "point onward. Write memory at address %s?"),
1654 error (_(
"Process record canceled the operation."));
1671 "Process record: failed to record "
1680 "Process record: failed to record "
1695 offset, len, xfered_len);
1709 bool in_target_beneath_)
1744 (
loc->target_info.placed_address_space,
1745 loc->target_info.placed_address, 1);
1757 bool in_target_beneath =
false;
1767 scoped_restore restore_operation_disable
1774 in_target_beneath =
true;
1785 gdb_assert (
bp.in_target_beneath == in_target_beneath);
1812 if (
bp.in_target_beneath)
1814 scoped_restore restore_operation_disable
1829 gdb_assert_not_reached (
"removing unknown breakpoint");
1855 "record_full_get_bookmark returns %s\n", ret);
1858 "record_full_get_bookmark returns NULL\n");
1860 return (gdb_byte *) ret;
1869 const char *
bookmark = (
const char *) raw_bookmark;
1873 "record_full_goto_bookmark receives %s\n",
bookmark);
1875 std::string name_holder;
1879 error (_(
"Unbalanced quotes: %s"),
bookmark);
1922 gdb_printf (_(
"Lowest recorded instruction number is %s.\n"),
1927 gdb_printf (_(
"Current instruction number is %s.\n"),
1931 gdb_printf (_(
"Highest recorded instruction number is %s.\n"),
1935 gdb_printf (_(
"Log contains %u instructions.\n"),
1939 gdb_printf (_(
"No instructions have been logged.\n"));
1942 gdb_printf (_(
"Max logged instructions is %u.\n"),
1986 error (_(
"Target insn not found."));
1988 error (_(
"Already at target insn."));
1991 gdb_printf (_(
"Go forward to insn number %s\n"),
1997 gdb_printf (_(
"Go backward to insn number %s\n"),
2031 for (; p!= NULL; p = p->
prev)
2064 enum gdb_signal signal)
2093 for (i = 0; i < num; i ++)
2116 error (_(
"You can't do that without a process to debug."));
2123 const char *annex, gdb_byte *readbuf,
2124 const gdb_byte *writebuf, ULONGEST offset,
2125 ULONGEST len, ULONGEST *xfered_len)
2133 if (offset >= p.addr)
2136 ULONGEST sec_offset;
2138 if (offset >= p.endaddr)
2141 if (offset + len > p.endaddr)
2142 len = p.endaddr - offset;
2144 sec_offset = offset - p.addr;
2148 if (p.the_bfd_section->flags & SEC_CONSTRUCTOR
2149 || (p.the_bfd_section->flags & SEC_HAS_CONTENTS) == 0)
2152 memset (readbuf, 0, len);
2159 entry = entry->prev)
2169 if (!bfd_malloc_and_get_section
2170 (p.the_bfd_section->owner,
2181 memcpy (entry->buf + sec_offset, writebuf,
2192 memcpy (readbuf, entry->buf + sec_offset,
2204 error (_(
"You can't do that without a process to debug."));
2208 readbuf, writebuf, offset, len,
2286 int ret = bfd_get_section_contents (
obfd, osec,
buf, *offset, len);
2291 error (_(
"Failed to read %d bytes from core file %s ('%s')."),
2292 len, bfd_get_filename (
obfd),
2293 bfd_errmsg (bfd_get_error ()));
2296static inline uint64_t
2302 BFD_ENDIAN_BIG, input);
2306static inline uint32_t
2312 BFD_ENDIAN_BIG, input);
2339 osec = bfd_get_section_by_name (
core_bfd,
"null0");
2342 osec ?
"succeeded" :
"failed");
2345 osec_size = bfd_section_size (osec);
2352 error (_(
"Version mis-match or file format error in core file %s."),
2356 " Reading 4-byte magic cookie "
2357 "RECORD_FULL_FILE_MAGIC (0x%s)\n",
2373 uint32_t
regnum, len, signal, count;
2377 if (bfd_offset >= osec_size)
2386 sizeof (
regnum), &bfd_offset);
2397 " Reading register %d (1 "
2398 "plus %lu plus %d bytes)\n",
2400 (
unsigned long) sizeof (
regnum),
2407 sizeof (len), &bfd_offset);
2412 sizeof (addr), &bfd_offset);
2423 " Reading memory %s (1 plus "
2424 "%lu plus %lu plus %d bytes)\n",
2427 (
unsigned long) sizeof (addr),
2428 (
unsigned long)
sizeof (len),
2438 sizeof (signal), &bfd_offset);
2440 rec->
u.
end.
sigval = (
enum gdb_signal) signal;
2444 sizeof (count), &bfd_offset);
2450 " Reading record_full_end (1 + "
2451 "%lu + %lu bytes), offset == %s\n",
2452 (
unsigned long)
sizeof (signal),
2453 (
unsigned long)
sizeof (count),
2459 error (_(
"Bad entry type in core file %s."),
2468 catch (
const gdb_exception &ex)
2484 warning (_(
"Auto increase record/replay buffer limit to %u."),
2489 gdb_printf (_(
"Restored records from core file %s.\n"),
2500 int ret = bfd_set_section_contents (
obfd, osec, buf, *offset, len);
2505 error (_(
"Failed to write %d bytes to core file %s ('%s')."),
2506 len, bfd_get_filename (
obfd),
2507 bfd_errmsg (bfd_get_error ()));
2531 asection *osec = NULL;
2543 gdb::unlinker unlink_file (recfilename);
2553 scoped_restore restore_operation_disable
2576 save_size += 1 + 4 + 4;
2587 osec = bfd_make_section_anyway_with_flags (
obfd.get (),
"precord",
2591 error (_(
"Failed to create 'precord' section for corefile %s: %s"),
2593 bfd_errmsg (bfd_get_error ()));
2594 bfd_set_section_size (osec, save_size);
2595 bfd_set_section_vma (osec, 0);
2596 bfd_set_section_alignment (osec, 0);
2606 " Writing 4-byte magic cookie "
2607 "RECORD_FULL_FILE_MAGIC (0x%s)\n",
2608 phex_nz (magic, 4));
2620 uint32_t
regnum, len, signal, count;
2631 " Writing register %d (1 "
2632 "plus %lu plus %d bytes)\n",
2634 (
unsigned long) sizeof (
regnum),
2640 sizeof (
regnum), &bfd_offset);
2651 " Writing memory %s (1 plus "
2652 "%lu plus %lu plus %d bytes)\n",
2655 (
unsigned long) sizeof (addr),
2656 (
unsigned long)
sizeof (len),
2667 sizeof (addr), &bfd_offset);
2678 " Writing record_full_end (1 + "
2679 "%lu + %lu bytes)\n",
2680 (
unsigned long)
sizeof (signal),
2681 (
unsigned long)
sizeof (count));
2685 sizeof (signal), &bfd_offset);
2690 sizeof (count), &bfd_offset);
2717 unlink_file.keep ();
2720 gdb_printf (_(
"Saved core file %s with execution log.\n"),
2732 scoped_restore restore_operation_disable
2783 if (args !=
nullptr)
2790 while (to_print->
next !=
nullptr && offset > 0)
2792 to_print = to_print->
next;
2797 error (_(
"Not enough recorded history"));
2801 while (to_print->
prev !=
nullptr && offset < 0)
2803 to_print = to_print->
prev;
2808 error (_(
"Not enough recorded history"));
2811 gdb_assert (to_print !=
nullptr);
2815 to_print = to_print->
prev;
2820 error (_(
"Not enough recorded history"));
2824 switch (to_print->
type)
2846 gdb_printf (
"%d bytes of memory at address %s changed from:",
2850 for (
int i = 0; i < to_print->
u.
mem.
len; i++)
2856 to_print = to_print->
next;
2881 _(
"Restore the execution log from a file.\n\
2882Argument is filename. File must be created with 'record save'."),
2893 _(
"Set record options."),
2894 _(
"Show record options."),
2904Set whether record/replay stops when record/replay buffer becomes full."), _(
"\
2905Show whether record/replay stops when record/replay buffer becomes full."),
2906 _(
"Default is ON.\n\
2907When ON, if the record/replay buffer becomes full, ask user what to do.\n\
2908When OFF, if the record/replay buffer becomes full,\n\
2909delete the oldest recorded instruction to make room for each new one."),
2915 set_record_full_stop_at_limit_cmds.
set,
no_class, 1,
2927 _(
"Set record/replay buffer limit."),
2928 _(
"Show record/replay buffer limit."), _(
"\
2929Set the maximum number of instructions to be stored in the\n\
2930record/replay buffer. A value of either \"unlimited\" or zero means no\n\
2931limit. Default is 200000."),
2936 c =
add_alias_cmd (
"insn-number-max", record_full_insn_number_max_cmds.
set,
2947Set whether query if PREC cannot record memory change of next instruction."),
2949Show whether query if PREC cannot record memory change of next instruction."),
2952When ON, query if PREC cannot record memory change of next instruction."),
2968Print a recorded instruction.\n\
2969If no argument is provided, print the last instruction recorded.\n\
2970If a negative argument is given, prints how the nth previous \
2971instruction will be undone.\n\
2972If a positive argument is given, prints \
struct gdbarch * get_current_arch(void)
struct gdbarch * target_gdbarch(void)
void mark_async_event_handler(async_event_handler *async_handler_ptr)
async_event_handler * create_async_event_handler(async_event_handler_func *proc, gdb_client_data client_data, const char *name)
void clear_async_event_handler(async_event_handler *async_handler_ptr)
void delete_async_event_handler(async_event_handler **async_handler_ptr)
const std::vector< bp_location * > & all_bp_locations()
int hardware_watchpoint_inserted_in_range(const address_space *aspace, CORE_ADDR addr, ULONGEST len)
int insert_single_step_breakpoints(struct gdbarch *gdbarch)
@ bp_loc_software_breakpoint
int unpush_target(struct target_ops *t)
void push_target(struct target_ops *t)
struct process_stratum_target * process_target()
bool commit_resumed_state
enum register_status raw_read(int regnum, gdb_byte *buf)
enum register_status cooked_read(int regnum, gdb_byte *buf)
void info_record() override
bool can_execute_reverse() override
void goto_bookmark(const gdb_byte *, int) override
ptid_t wait(ptid_t, struct target_waitstatus *, target_wait_flags) override
enum record_method record_method(ptid_t ptid) override
void goto_record_begin() override
void goto_record_end() override
bool supports_stopped_by_hw_breakpoint() override
bool supports_delete_record() override
bool stopped_by_sw_breakpoint() override
void goto_record(ULONGEST insn) override
gdb_byte * get_bookmark(const char *, int) override
enum exec_direction_kind execution_direction() override
bool supports_stopped_by_sw_breakpoint() override
bool stopped_by_watchpoint() override
void delete_record() override
strata stratum() const override
bool stopped_data_address(CORE_ADDR *) override
void save_record(const char *filename) override
void async(bool) override
bool record_will_replay(ptid_t ptid, int dir) override
bool stopped_by_hw_breakpoint() override
void record_stop_replaying() override
bool record_is_replaying(ptid_t ptid) override
const target_info & info() const override=0
enum target_xfer_status xfer_partial(enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, ULONGEST len, ULONGEST *xfered_len) override
void resume(ptid_t, int, enum gdb_signal) override
void store_registers(struct regcache *, int) override
void fetch_registers(struct regcache *regcache, int regno) override
void prepare_to_store(struct regcache *regcache) override
int remove_breakpoint(struct gdbarch *, struct bp_target_info *, enum remove_bp_reason) override
const target_info & info() const override
int insert_breakpoint(struct gdbarch *, struct bp_target_info *) override
bool has_execution(inferior *inf) override
void disconnect(const char *, int) override
void disconnect(const char *, int) override
void mourn_inferior() override
int remove_breakpoint(struct gdbarch *, struct bp_target_info *, enum remove_bp_reason) override
void store_registers(struct regcache *, int) override
void detach(inferior *, int) override
int insert_breakpoint(struct gdbarch *, struct bp_target_info *) override
enum target_xfer_status xfer_partial(enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, ULONGEST len, ULONGEST *xfered_len) override
void resume(ptid_t, int, enum gdb_signal) override
const target_info & info() const override
void invalidate(int regnum)
void raw_supply(int regnum, const void *buf) override
friend class detached_regcache
void cooked_write(int regnum, const gdb_byte *buf)
const address_space * aspace() const
void set_stop_pc(CORE_ADDR stop_pc)
struct cmd_list_element * maintenanceprintlist
struct cmd_list_element * add_alias_cmd(const char *name, cmd_list_element *target, enum command_class theclass, int abbrev_flag, struct cmd_list_element **list)
struct cmd_list_element * add_cmd(const char *name, enum command_class theclass, const char *doc, struct cmd_list_element **list)
void set_cmd_completer(struct cmd_list_element *cmd, completer_ftype *completer)
set_show_commands add_setshow_uinteger_cmd(const char *name, enum command_class theclass, unsigned int *var, const literal_def *extra_literals, const char *set_doc, const char *show_doc, const char *help_doc, cmd_func_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
struct cmd_list_element * deprecate_cmd(struct cmd_list_element *cmd, const char *replacement)
set_show_commands add_setshow_prefix_cmd(const char *name, command_class theclass, const char *set_doc, const char *show_doc, cmd_list_element **set_subcommands_list, cmd_list_element **show_subcommands_list, cmd_list_element **set_list, cmd_list_element **show_list)
struct cmd_list_element * add_prefix_cmd(const char *name, enum command_class theclass, cmd_simple_func_ftype *fun, const char *doc, struct cmd_list_element **subcommands, int allow_unknown, struct cmd_list_element **list)
set_show_commands add_setshow_boolean_cmd(const char *name, enum command_class theclass, bool *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_func_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
void filename_completer(struct cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *word)
void core_file_command(const char *filename, int from_tty)
static void store_unsigned_integer(gdb_byte *addr, int len, enum bfd_endian byte_order, ULONGEST val)
struct value * parse_and_eval(const char *exp, parser_flags flags)
void handle_sigint(int sig)
void exception_print(struct ui_file *file, const struct gdb_exception &e)
target_section_table build_section_table(struct bfd *some_bfd)
void reinit_frame_cache(void)
frame_info_ptr get_selected_frame(const char *message)
void print_stack_frame(frame_info_ptr, int print_level, enum print_what print_what, int set_current_sal)
gdb_bfd_ref_ptr create_gcore_bfd(const char *filename)
void write_gcore_file(bfd *obfd)
gdb::ref_ptr< struct bfd, gdb_bfd_ref_policy > gdb_bfd_ref_ptr
const char * gdbarch_register_name(struct gdbarch *gdbarch, int regnr)
int gdbarch_process_record_signal(struct gdbarch *gdbarch, struct regcache *regcache, enum gdb_signal signal)
struct type * gdbarch_register_type(struct gdbarch *gdbarch, int reg_nr)
int gdbarch_num_regs(struct gdbarch *gdbarch)
int gdbarch_process_record(struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr)
bool gdbarch_process_record_signal_p(struct gdbarch *gdbarch)
bool gdbarch_software_single_step_p(struct gdbarch *gdbarch)
bool gdbarch_process_record_p(struct gdbarch *gdbarch)
void execute_command(const char *, int)
all_non_exited_threads_range all_non_exited_threads(process_stratum_target *proc_target=nullptr, ptid_t filter_ptid=minus_one_ptid)
void set_executing(process_stratum_target *targ, ptid_t ptid, bool executing)
struct thread_info * inferior_thread(void)
void switch_to_thread(struct thread_info *thr)
int thread_has_single_step_breakpoints_set(struct thread_info *tp)
void delete_single_step_breakpoints(struct thread_info *tp)
mach_port_t mach_port_t name mach_port_t mach_port_t name kern_return_t int status
void inferior_event_handler(enum inferior_event_type event_type)
struct inferior * current_inferior(void)
enum exec_direction_kind execution_direction
void interps_notify_record_changed(inferior *inf, int started, const char *method, const char *format)
static void record_full_restore(void)
static struct record_full_entry * record_full_end_alloc(void)
static unsigned int record_full_insn_num
#define DEFAULT_RECORD_FULL_INSN_MAX_NUM
static void record_full_end_release(struct record_full_entry *rec)
static enum exec_direction_kind record_full_execution_dir
static struct record_full_entry * record_full_list
static void record_full_registers_change(struct regcache *regcache, int regnum)
static void record_full_goto_entry(struct record_full_entry *p)
static const char record_doc[]
static struct record_full_entry * record_full_arch_list_tail
static ptid_t record_full_resume_ptid
static void record_full_sig_handler(int signo)
static void cmd_record_full_start(const char *args, int from_tty)
static void record_full_goto_insn(struct record_full_entry *entry, enum exec_direction_kind dir)
static unsigned int record_full_insn_max_num
#define RECORD_FULL_IS_REPLAY
static int record_full_resume_step
static struct cmd_list_element * set_record_full_cmdlist
static enum target_stop_reason record_full_stop_reason
static void record_full_exec_insn(struct regcache *regcache, struct gdbarch *gdbarch, struct record_full_entry *entry)
bool record_full_memory_query
static struct cmd_list_element * show_record_full_cmdlist
static void record_full_check_insn_num(void)
static const target_info record_full_target_info
static void record_full_message(struct regcache *regcache, enum gdb_signal signal)
static struct cmd_list_element * record_full_cmdlist
static void record_full_list_release_following(struct record_full_entry *rec)
int record_full_arch_list_add_reg(struct regcache *regcache, int regnum)
static uint64_t netorder64(uint64_t input)
static struct async_event_handler * record_full_async_inferior_event_token
static record_full_core_target record_full_core_ops
static void maintenance_print_record_instruction(const char *args, int from_tty)
#define RECORD_FULL_FILE_MAGIC
static void set_record_full_insn_max_num(const char *args, int from_tty, struct cmd_list_element *c)
static struct record_full_entry record_full_first
int record_full_arch_list_add_mem(CORE_ADDR addr, int len)
static struct record_full_entry * record_full_arch_list_head
int record_full_arch_list_add_end(void)
static struct record_full_entry * record_full_mem_alloc(CORE_ADDR addr, int len)
static uint32_t netorder32(uint32_t input)
static void bfdcore_write(bfd *obfd, asection *osec, void *buf, int len, int *offset)
static void record_full_list_release(struct record_full_entry *rec)
static void record_full_mem_release(struct record_full_entry *rec)
static record_full_target record_full_ops
static int record_full_gdb_operation_disable
static void record_full_arch_list_add(struct record_full_entry *rec)
static void record_full_list_release_first(void)
static void record_full_open_1(const char *name, int from_tty)
void _initialize_record_full()
static bool record_full_message_wrapper_safe(struct regcache *regcache, enum gdb_signal signal)
static int record_full_get_sig
static bool record_full_stop_at_limit
int record_full_is_used(void)
static ULONGEST record_full_insn_count
static void record_full_reg_release(struct record_full_entry *rec)
static detached_regcache * record_full_core_regbuf
static ptid_t record_full_wait_1(struct target_ops *ops, ptid_t ptid, struct target_waitstatus *status, target_wait_flags options)
static void record_full_core_open_1(const char *name, int from_tty)
static struct record_full_core_buf_entry * record_full_core_buf_list
static struct record_full_entry * record_full_reg_alloc(struct regcache *regcache, int regnum)
static target_section_table record_full_core_sections
static std::vector< record_full_breakpoint > record_full_breakpoints
static void record_full_init_record_breakpoints(void)
static gdb_byte * record_full_get_loc(struct record_full_entry *rec)
static enum record_full_type record_full_entry_release(struct record_full_entry *rec)
static void bfdcore_read(bfd *obfd, asection *osec, void *buf, int len, int *offset)
static void cmd_record_full_restore(const char *args, int from_tty)
static const target_info record_full_core_target_info
static const char record_longname[]
static void record_full_open(const char *name, int from_tty)
static int record_full_resumed
static void record_full_async_inferior_event_handler(gdb_client_data data)
scoped_restore_tmpl< int > record_full_gdb_operation_disable_set(void)
void record_detach(struct target_ops *t, inferior *inf, int from_tty)
unsigned int record_debug
struct cmd_list_element * set_record_cmdlist
void record_goto(const char *arg)
int record_read_memory(struct gdbarch *gdbarch, CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
struct cmd_list_element * show_record_cmdlist
void record_disconnect(struct target_ops *t, const char *args, int from_tty)
struct cmd_list_element * record_cmdlist
struct target_ops * find_record_target(void)
void record_preopen(void)
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)
CORE_ADDR regcache_read_pc(struct regcache *regcache)
int register_size(struct gdbarch *gdbarch, int regnum)
struct regcache * get_current_regcache(void)
void registers_changed(void)
struct address_space * placed_address_space
struct address_space * address_space
record_full_breakpoint(struct address_space *address_space_, CORE_ADDR addr_, bool in_target_beneath_)
struct target_section * p
struct record_full_core_buf_entry * prev
struct record_full_mem_entry mem
struct record_full_end_entry end
enum record_full_type type
union record_full_entry::@159 u
struct record_full_entry * next
struct record_full_entry * prev
struct record_full_reg_entry reg
union record_full_mem_entry::@157 u
gdb_byte buf[sizeof(gdb_byte *)]
int mem_entry_not_accessible
gdb_byte buf[2 *sizeof(gdb_byte *)]
union record_full_reg_entry::@158 u
virtual ptid_t wait(ptid_t, struct target_waitstatus *, target_wait_flags options) TARGET_DEFAULT_FUNC(default_target_wait)
virtual int remove_breakpoint(struct gdbarch *, struct bp_target_info *, enum remove_bp_reason) TARGET_DEFAULT_NORETURN(noprocess())
virtual bool stopped_by_watchpoint() TARGET_DEFAULT_RETURN(false)
target_ops * beneath() const
virtual bool stopped_data_address(CORE_ADDR *) TARGET_DEFAULT_RETURN(false)
virtual void commit_resumed() TARGET_DEFAULT_IGNORE()
virtual void store_registers(struct regcache *, int) TARGET_DEFAULT_NORETURN(noprocess())
virtual enum target_xfer_status xfer_partial(enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, ULONGEST len, ULONGEST *xfered_len) TARGET_DEFAULT_RETURN(TARGET_XFER_E_IO)
virtual void async(bool) TARGET_DEFAULT_NORETURN(tcomplain())
virtual void resume(ptid_t, int TARGET_DEBUG_PRINTER(target_debug_print_step), enum gdb_signal) TARGET_DEFAULT_NORETURN(noprocess())
virtual int insert_breakpoint(struct gdbarch *, struct bp_target_info *) TARGET_DEFAULT_NORETURN(noprocess())
std::vector< target_section > target_section_table
void target_fetch_registers(struct regcache *regcache, int regno)
void target_pass_signals(gdb::array_view< const unsigned char > pass_signals)
gdbarch * target_thread_architecture(ptid_t ptid)
void add_deprecated_target_alias(const target_info &tinfo, const char *alias)
int target_write_memory(CORE_ADDR memaddr, const gdb_byte *myaddr, ssize_t len)
bool target_has_execution(inferior *inf)
void add_target(const target_info &t, target_open_ftype *func, completer_ftype *completer)
bool target_stopped_by_watchpoint()
@ TARGET_OBJECT_RAW_MEMORY
const char * print_core_address(struct gdbarch *gdbarch, CORE_ADDR address)
int query(const char *ctlstr,...)
const char * paddress(struct gdbarch *gdbarch, CORE_ADDR addr)
int yquery(const char *ctlstr,...)
void gdb_printf(struct ui_file *stream, const char *format,...)
void value_print(struct value *val, struct ui_file *stream, const struct value_print_options *options)
void get_user_print_options(struct value_print_options *opts)
struct value * value_from_contents(struct type *type, const gdb_byte *contents)
LONGEST value_as_long(struct value *val)
@ TARGET_WAITKIND_STOPPED
@ TARGET_STOPPED_BY_SW_BREAKPOINT
@ TARGET_STOPPED_BY_WATCHPOINT
@ TARGET_STOPPED_BY_HW_BREAKPOINT
@ TARGET_STOPPED_BY_NO_REASON