22#if !defined (TARGET_H)
48#include "gdbsupport/scoped_restore.h"
49#include "gdbsupport/refcounted-object.h"
82#include "gdbsupport/gdb_signals.h"
88#include "gdbsupport/fileio.h"
89#include "gdbsupport/x86-xstate.h"
91#include "gdbsupport/break-common.h"
247 const gdb_byte *writebuf,
250 ULONGEST *xfered_len);
254 const gdb_byte *writebuf, ULONGEST memaddr,
255 LONGEST len, ULONGEST *xfered_len);
275 const char *annex, gdb_byte *buf,
276 ULONGEST offset, LONGEST len);
281 gdb::unique_xmalloc_ptr<gdb_byte> &&data_)
299 gdb::unique_xmalloc_ptr<gdb_byte>
data;
303 (
struct target_ops *ops,
const ULONGEST offset,
const LONGEST len);
322 const char *annex,
const gdb_byte *buf,
323 ULONGEST offset, LONGEST len);
334 const char *annex,
const gdb_byte *buf,
335 ULONGEST offset, LONGEST len,
336 void (*progress) (ULONGEST,
void *),
372 gdb_byte *buf, LONGEST len);
374 CORE_ADDR addr,
int len,
375 enum bfd_endian byte_order);
392#define TARGET_DEBUG_PRINTER(FUNC)
413#define TARGET_DEFAULT_IGNORE()
414#define TARGET_DEFAULT_NORETURN(ARG)
415#define TARGET_DEFAULT_RETURN(ARG)
416#define TARGET_DEFAULT_FUNC(ARG)
437 :
public refcounted_object
465 virtual void close ();
476 virtual void attach (
const char *,
int);
490 virtual void resume (ptid_t,
511 target_wait_flags options)
579 enum target_hw_bp_type)
582 enum target_hw_bp_type)
625 virtual
void load (const
char *,
int)
652 gdb::array_view<const
int>)
695 virtual
void rcmd (const
char *command, struct
ui_file *output)
722 virtual
void async (
bool)
764 CORE_ADDR load_module_addr,
803 const gdb_byte *writebuf,
804 ULONGEST offset, ULONGEST len,
805 ULONGEST *xfered_len)
835 virtual
void flash_erase (ULONGEST address, LONGEST length)
870 virtual
int auxv_parse (const gdb_byte **readptr,
871 const gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
880 virtual
int search_memory (CORE_ADDR start_addr, ULONGEST search_space_len,
881 const gdb_byte *pattern, ULONGEST pattern_len,
882 CORE_ADDR *found_addrp)
923 virtual
void dumpcore (const
char *filename)
960 int flags,
int mode,
int warn_if_slow,
961 fileio_error *target_errno);
966 virtual
int fileio_pwrite (
int fd, const gdb_byte *write_buf,
int len,
967 ULONGEST offset, fileio_error *target_errno);
972 virtual
int fileio_pread (
int fd, gdb_byte *read_buf,
int len,
973 ULONGEST offset, fileio_error *target_errno);
978 virtual
int fileio_fstat (
int fd, struct stat *sb, fileio_error *target_errno);
982 virtual
int fileio_close (
int fd, fileio_error *target_errno);
989 const
char *filename,
990 fileio_error *target_errno);
998 const
char *filename,
999 fileio_error *target_errno);
1060 CORE_ADDR addr1, CORE_ADDR addr2,
int *tpp)
1079 ULONGEST offset, LONGEST len)
1102 const
char *stopnotes)
1120 CORE_ADDR memaddr, ULONGEST
size)
1164 const struct btrace_config *conf)
1180 virtual enum btrace_error
read_btrace (struct btrace_data *data,
1181 struct btrace_target_info *btinfo,
1182 enum btrace_read_type
type)
1186 virtual const struct btrace_config *
btrace_conf (const struct btrace_target_info *)
1249 gdb_disassembly_flags
flags)
1255 gdb_disassembly_flags
flags)
1313 gdb::byte_vector &tags,
int type)
1327 const
gdb::byte_vector &tags,
int type)
1394 {
return at (t->
stratum ()) == t; }
1496 int step,
enum gdb_signal signal);
1511 target_wait_flags options);
1583extern int target_read_code (CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len);
1608 gdb_byte *data_ =
nullptr,
void *baton_ =
nullptr)
1609 : begin (begin_), end (end_), data (data_), baton (baton_)
1647 (
const std::vector<memory_write_request> &requests,
1649 void (*progress_cb) (ULONGEST,
void *));
1690extern void target_load (
const char *arg,
int from_tty);
1728 const char *execd_pathname);
1756 (
int pid,
bool needed,
int any_count,
1757 gdb::array_view<const int> syscall_counts);
1931 (
const gdb_byte *thread_handle,
int handle_len,
struct inferior *
inf);
2077 enum target_hw_bp_type);
2085 enum target_hw_bp_type);
2106#define target_stopped_data_address(target, addr_p) \
2107 (target)->stopped_data_address (addr_p)
2111#define target_watchpoint_addr_within_range(target, addr, start, length) \
2112 (target)->watchpoint_addr_within_range (addr, start, length)
2144 ULONGEST search_space_len,
2145 const gdb_byte *pattern,
2146 ULONGEST pattern_len,
2147 CORE_ADDR *found_addrp);
2163 const char *filename,
int flags,
2164 int mode,
bool warn_if_slow,
2165 fileio_error *target_errno);
2171 ULONGEST offset, fileio_error *target_errno);
2177 ULONGEST offset, fileio_error *target_errno);
2183 fileio_error *target_errno);
2194 const char *filename,
2195 fileio_error *target_errno);
2203 (
struct inferior *
inf,
const char *filename, fileio_error *target_errno);
2218 const char *filename,
2263 CORE_ADDR addr2,
int *tpp);
2285 const char *stopnotes);
2294extern std::vector<static_tracepoint_marker>
2308 gdb::byte_vector &tags,
int type);
2311 const gdb::byte_vector &tags,
int type);
2332 const gdb_byte *data,
2333 CORE_ADDR memaddr, ULONGEST
size);
2341 CORE_ADDR memaddr, ULONGEST
size);
2383 void operator() (
struct target_ops *ops)
const;
2423template <
typename BaseTarget>
2453extern void noprocess (
void) ATTRIBUTE_NORETURN;
2477extern scoped_restore_tmpl<int>
2497extern struct btrace_target_info *
2508 struct btrace_target_info *,
2509 enum btrace_read_type);
2512extern const struct btrace_config *
2553 gdb_disassembly_flags
flags);
2557 gdb_disassembly_flags
flags);
2564 record_print_flags
flags);
2568 record_print_flags
flags);
int default_auxv_parse(struct target_ops *ops, const gdb_byte **readptr, const gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
bool is_pushed(const target_ops *t) const
target_ops * at(strata stratum) const
DISABLE_COPY_AND_ASSIGN(target_stack)
void completer_ftype(struct cmd_list_element *, completion_tracker &tracker, const char *text, const char *word)
static void push(int indent, string_file *stream, ULONGEST l)
int(* find_memory_region_ftype)(CORE_ADDR addr, unsigned long size, int read, int write, int exec, int modified, bool memory_tagged, void *data)
mach_port_t kern_return_t mach_port_t mach_msg_type_name_t msgportsPoly mach_port_t kern_return_t pid_t pid mach_port_t kern_return_t mach_port_t task mach_port_t kern_return_t int flags
mach_port_t mach_port_t name mach_port_t mach_port_t name kern_return_t int int rusage_t pid_t pid
mach_port_t mach_port_t name mach_port_t mach_port_t name kern_return_t int status
static bool follow_fork()
int memory_remove_breakpoint(struct target_ops *ops, struct gdbarch *gdbarch, struct bp_target_info *bp_tgt, enum remove_bp_reason reason)
int memory_insert_breakpoint(struct target_ops *ops, struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
void(* func)(remote_target *remote, char *)
int remove_breakpoint(struct gdbarch *gdbarch, struct bp_target_info *bp_tgt, enum remove_bp_reason reason) override
int insert_breakpoint(struct gdbarch *gdbarch, struct bp_target_info *bp_tgt) override
memory_read_result(ULONGEST begin_, ULONGEST end_, gdb::unique_xmalloc_ptr< gdb_byte > &&data_)
memory_read_result(memory_read_result &&other)=default
gdb::unique_xmalloc_ptr< gdb_byte > data
~memory_read_result()=default
DISABLE_COPY_AND_ASSIGN(memory_read_result)
memory_write_request(ULONGEST begin_, ULONGEST end_, gdb_byte *data_=nullptr, void *baton_=nullptr)
static void incref(target_ops *t)
virtual LONGEST get_raw_trace_data(gdb_byte *buf, ULONGEST offset, LONGEST len) TARGET_DEFAULT_NORETURN(tcomplain())
virtual std::vector< mem_region > virtual memory_map() TARGET_DEFAULT_RETURN(std void flash_erase(ULONGEST address, LONGEST length) TARGET_DEFAULT_NORETURN(tcomplain())
virtual int fileio_close(int fd, fileio_error *target_errno)
virtual bool attach_no_wait() TARGET_DEFAULT_RETURN(0)
virtual int insert_mask_watchpoint(CORE_ADDR, CORE_ADDR, enum target_hw_bp_type) TARGET_DEFAULT_RETURN(1)
virtual int async_wait_fd() TARGET_DEFAULT_NORETURN(noprocess())
virtual ptid_t wait(ptid_t, struct target_waitstatus *, target_wait_flags options) TARGET_DEFAULT_FUNC(default_target_wait)
virtual gdb::optional< std::string > fileio_readlink(struct inferior *inf, const char *filename, fileio_error *target_errno)
virtual void insn_history(int size, gdb_disassembly_flags flags) TARGET_DEFAULT_NORETURN(tcomplain())
virtual bool have_steppable_watchpoint() TARGET_DEFAULT_RETURN(false)
virtual void goto_record(ULONGEST insn) TARGET_DEFAULT_NORETURN(tcomplain())
virtual void set_trace_buffer_size(LONGEST val) TARGET_DEFAULT_IGNORE()
virtual void terminal_inferior() TARGET_DEFAULT_IGNORE()
virtual int core_of_thread(ptid_t ptid) TARGET_DEFAULT_RETURN(-1)
virtual struct address_space * thread_address_space(ptid_t) TARGET_DEFAULT_RETURN(NULL)
virtual void load(const char *, int) TARGET_DEFAULT_NORETURN(tcomplain())
virtual bool can_async_p() TARGET_DEFAULT_RETURN(false)
virtual bool can_create_inferior()
virtual void goto_record_begin() TARGET_DEFAULT_NORETURN(tcomplain())
virtual int find_memory_regions(find_memory_region_ftype func, void *data) TARGET_DEFAULT_FUNC(dummy_find_memory_regions)
virtual void get_tracepoint_status(tracepoint *tp, struct uploaded_tp *utp) TARGET_DEFAULT_NORETURN(tcomplain())
virtual void trace_init() TARGET_DEFAULT_NORETURN(tcomplain())
virtual void prepare_to_generate_core() TARGET_DEFAULT_IGNORE()
virtual int remove_breakpoint(struct gdbarch *, struct bp_target_info *, enum remove_bp_reason) TARGET_DEFAULT_NORETURN(noprocess())
virtual int search_memory(CORE_ADDR start_addr, ULONGEST search_space_len, const gdb_byte *pattern, ULONGEST pattern_len, CORE_ADDR *found_addrp) TARGET_DEFAULT_FUNC(default_search_memory)
virtual bool static_tracepoint_marker_at(CORE_ADDR, static_tracepoint_marker *marker) TARGET_DEFAULT_RETURN(false)
virtual int remove_hw_breakpoint(struct gdbarch *, struct bp_target_info *) TARGET_DEFAULT_RETURN(-1)
virtual void pass_signals(gdb::array_view< const unsigned char > TARGET_DEBUG_PRINTER(target_debug_print_signals)) TARGET_DEFAULT_IGNORE()
const char * longname() const
virtual int fileio_pread(int fd, gdb_byte *read_buf, int len, ULONGEST offset, fileio_error *target_errno)
virtual std::string pid_to_str(ptid_t) TARGET_DEFAULT_FUNC(default_pid_to_str)
virtual void terminal_init() TARGET_DEFAULT_IGNORE()
virtual void fetch_registers(struct regcache *, int) TARGET_DEFAULT_IGNORE()
virtual bool supports_evaluation_of_breakpoint_conditions() TARGET_DEFAULT_RETURN(false)
virtual bool use_agent(bool use) TARGET_DEFAULT_NORETURN(tcomplain())
virtual bool stopped_by_sw_breakpoint() TARGET_DEFAULT_RETURN(false)
virtual void create_inferior(const char *, const std::string &, char **, int)
virtual bool can_download_tracepoint() TARGET_DEFAULT_RETURN(false)
virtual thread_control_capabilities get_thread_control_capabilities() TARGET_DEFAULT_RETURN(tc_none)
virtual void goto_bookmark(const gdb_byte *, int) TARGET_DEFAULT_NORETURN(tcomplain())
virtual void detach(inferior *, int) TARGET_DEFAULT_IGNORE()
virtual void insn_history_from(ULONGEST from, int size, gdb_disassembly_flags flags) TARGET_DEFAULT_NORETURN(tcomplain())
virtual bool has_memory()
virtual int fileio_unlink(struct inferior *inf, const char *filename, fileio_error *target_errno)
virtual void enable_tracepoint(struct bp_location *location) TARGET_DEFAULT_NORETURN(tcomplain())
virtual void set_circular_trace_buffer(int val) TARGET_DEFAULT_IGNORE()
virtual thread_info * thread_handle_to_thread_info(const gdb_byte *, int, inferior *inf) TARGET_DEFAULT_RETURN(NULL)
virtual int remove_watchpoint(CORE_ADDR, int, enum target_hw_bp_type, struct expression *) TARGET_DEFAULT_RETURN(-1)
virtual void goto_record_end() TARGET_DEFAULT_NORETURN(tcomplain())
virtual void trace_set_readonly_regions() TARGET_DEFAULT_NORETURN(tcomplain())
virtual void terminal_ours_for_output() TARGET_DEFAULT_IGNORE()
virtual void record_stop_replaying() TARGET_DEFAULT_IGNORE()
virtual bool supports_multi_process() TARGET_DEFAULT_RETURN(false)
virtual int insert_watchpoint(CORE_ADDR, int, enum target_hw_bp_type, struct expression *) TARGET_DEFAULT_RETURN(-1)
virtual void info_record() TARGET_DEFAULT_IGNORE()
virtual bool stopped_by_watchpoint() TARGET_DEFAULT_RETURN(false)
target_ops * beneath() const
virtual int can_do_single_step() TARGET_DEFAULT_RETURN(-1)
virtual bool get_trace_state_variable_value(int tsv, LONGEST *val) TARGET_DEFAULT_RETURN(false)
virtual bool stopped_data_address(CORE_ADDR *) TARGET_DEFAULT_RETURN(false)
virtual void download_tracepoint(struct bp_location *location) TARGET_DEFAULT_NORETURN(tcomplain())
virtual bool can_attach()
virtual void kill() TARGET_DEFAULT_NORETURN(noprocess())
virtual bool can_execute_reverse() TARGET_DEFAULT_RETURN(false)
virtual int get_trace_status(struct trace_status *ts) TARGET_DEFAULT_RETURN(-1)
virtual int insert_hw_breakpoint(struct gdbarch *, struct bp_target_info *) TARGET_DEFAULT_RETURN(-1)
virtual void set_disconnected_tracing(int val) TARGET_DEFAULT_IGNORE()
virtual void save_record(const char *filename) TARGET_DEFAULT_NORETURN(tcomplain())
virtual void program_signals(gdb::array_view< const unsigned char > TARGET_DEBUG_PRINTER(target_debug_print_signals)) TARGET_DEFAULT_IGNORE()
virtual void commit_resumed() TARGET_DEFAULT_IGNORE()
virtual enum exec_direction_kind execution_direction() TARGET_DEFAULT_FUNC(default_execution_direction)
virtual int insert_fork_catchpoint(int) TARGET_DEFAULT_RETURN(1)
virtual struct btrace_target_info * enable_btrace(thread_info *tp, const struct btrace_config *conf) TARGET_DEFAULT_NORETURN(tcomplain())
virtual void store_registers(struct regcache *, int) TARGET_DEFAULT_NORETURN(noprocess())
virtual bool fetch_memtags(CORE_ADDR address, size_t len, gdb::byte_vector &tags, int type) TARGET_DEFAULT_NORETURN(tcomplain())
virtual void terminal_ours() TARGET_DEFAULT_IGNORE()
virtual void trace_start() TARGET_DEFAULT_NORETURN(tcomplain())
virtual void flash_done() TARGET_DEFAULT_NORETURN(tcomplain())
virtual void done_generating_core() TARGET_DEFAULT_IGNORE()
virtual int save_trace_data(const char *filename) TARGET_DEFAULT_NORETURN(tcomplain())
virtual gdb_byte * get_bookmark(const char *, int) TARGET_DEFAULT_NORETURN(tcomplain())
virtual int auxv_parse(const gdb_byte **readptr, const gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp) TARGET_DEFAULT_FUNC(default_auxv_parse)
virtual int can_use_hw_breakpoint(enum bptype, int, int) TARGET_DEFAULT_RETURN(0)
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 gdb::array_view< const_gdb_byte > virtual thread_info_to_thread_handle(struct thread_info *) TARGET_DEFAULT_RETURN(gdb voi stop)(ptid_t) TARGET_DEFAULT_IGNORE()
virtual ULONGEST get_memory_xfer_limit() TARGET_DEFAULT_RETURN(ULONGEST_MAX)
virtual bool record_is_replaying(ptid_t ptid) TARGET_DEFAULT_RETURN(false)
virtual bool supports_stopped_by_sw_breakpoint() TARGET_DEFAULT_RETURN(false)
virtual bool stopped_by_hw_breakpoint() TARGET_DEFAULT_RETURN(false)
virtual gdb::unique_xmalloc_ptr< char > make_corefile_notes(bfd *, int *) TARGET_DEFAULT_FUNC(dummy_make_corefile_notes)
virtual bool supports_disable_randomization() TARGET_DEFAULT_FUNC(find_default_supports_disable_randomization)
virtual const char * extra_thread_info(thread_info *) TARGET_DEFAULT_RETURN(NULL)
virtual bool filesystem_is_local() TARGET_DEFAULT_RETURN(true)
virtual x86_xsave_layout fetch_x86_xsave_layout() TARGET_DEFAULT_RETURN(x86_xsave_layout())
virtual bool can_run_breakpoint_commands() TARGET_DEFAULT_RETURN(false)
virtual int fileio_fstat(int fd, struct stat *sb, fileio_error *target_errno)
virtual strata stratum() const =0
virtual int ranged_break_num_registers() TARGET_DEFAULT_RETURN(-1)
virtual int get_min_fast_tracepoint_insn_len() TARGET_DEFAULT_RETURN(-1)
virtual const struct frame_unwind * get_tailcall_unwinder() TARGET_DEFAULT_RETURN(NULL)
virtual ptid_t get_ada_task_ptid(long lwp, ULONGEST thread) TARGET_DEFAULT_FUNC(default_get_ada_task_ptid)
virtual int masked_watch_num_registers(CORE_ADDR, CORE_ADDR) TARGET_DEFAULT_RETURN(-1)
virtual void async(bool) TARGET_DEFAULT_NORETURN(tcomplain())
virtual std::vector< static_tracepoint_marker > static_tracepoint_markers_by_strid(const char *id) TARGET_DEFAULT_NORETURN(tcomplain())
virtual void terminal_save_inferior() TARGET_DEFAULT_IGNORE()
const char * shortname() const
virtual bool supports_dumpcore() TARGET_DEFAULT_RETURN(false)
virtual bool supports_stopped_by_hw_breakpoint() TARGET_DEFAULT_RETURN(false)
virtual void resume(ptid_t, int TARGET_DEBUG_PRINTER(target_debug_print_step), enum gdb_signal) TARGET_DEFAULT_NORETURN(noprocess())
virtual bool is_async_p() TARGET_DEFAULT_RETURN(false)
virtual bool watchpoint_addr_within_range(CORE_ADDR, CORE_ADDR, int) TARGET_DEFAULT_FUNC(default_watchpoint_addr_within_range)
virtual const char * pid_to_exec_file(int pid) TARGET_DEFAULT_RETURN(NULL)
virtual struct gdbarch * thread_architecture(ptid_t) TARGET_DEFAULT_RETURN(NULL)
virtual bool can_accel_watchpoint_condition(CORE_ADDR, int, int, struct expression *) TARGET_DEFAULT_RETURN(false)
virtual void thread_events(int) TARGET_DEFAULT_IGNORE()
virtual bool supports_non_stop() TARGET_DEFAULT_RETURN(false)
virtual int verify_memory(const gdb_byte *data, CORE_ADDR memaddr, ULONGEST size) TARGET_DEFAULT_FUNC(default_verify_memory)
virtual void insn_history_range(ULONGEST begin, ULONGEST end, gdb_disassembly_flags flags) TARGET_DEFAULT_NORETURN(tcomplain())
virtual void log_command(const char *) TARGET_DEFAULT_IGNORE()
virtual void update_thread_list() TARGET_DEFAULT_IGNORE()
virtual const target_info & info() const =0
virtual bool has_registers()
virtual int trace_find(enum trace_find_type type, int num, CORE_ADDR addr1, CORE_ADDR addr2, int *tpp) TARGET_DEFAULT_RETURN(-1)
virtual bool has_all_memory()
virtual void delete_record() TARGET_DEFAULT_NORETURN(tcomplain())
virtual void teardown_btrace(struct btrace_target_info *tinfo) TARGET_DEFAULT_NORETURN(tcomplain())
virtual void stop_recording() TARGET_DEFAULT_IGNORE()
virtual bool store_memtags(CORE_ADDR address, size_t len, const gdb::byte_vector &tags, int type) TARGET_DEFAULT_NORETURN(tcomplain())
virtual void files_info() TARGET_DEFAULT_IGNORE()
virtual int upload_trace_state_variables(struct uploaded_tsv **utsvp) TARGET_DEFAULT_RETURN(0)
virtual void disable_tracepoint(struct bp_location *location) TARGET_DEFAULT_NORETURN(tcomplain())
virtual const char * thread_name(thread_info *) TARGET_DEFAULT_RETURN(NULL)
virtual void disable_btrace(struct btrace_target_info *tinfo) TARGET_DEFAULT_NORETURN(tcomplain())
virtual void pass_ctrlc() TARGET_DEFAULT_FUNC(default_target_pass_ctrlc)
virtual void prepare_to_store(struct regcache *) TARGET_DEFAULT_NORETURN(noprocess())
virtual void set_permissions() TARGET_DEFAULT_IGNORE()
virtual void interrupt() TARGET_DEFAULT_IGNORE()
virtual void trace_stop() TARGET_DEFAULT_NORETURN(tcomplain())
virtual int fileio_pwrite(int fd, const gdb_byte *write_buf, int len, ULONGEST offset, fileio_error *target_errno)
virtual void attach(const char *, int)
virtual bool can_use_agent() TARGET_DEFAULT_RETURN(false)
virtual void call_history_from(ULONGEST begin, int size, record_print_flags flags) TARGET_DEFAULT_NORETURN(tcomplain())
virtual bool augmented_libraries_svr4_read() TARGET_DEFAULT_RETURN(false)
virtual void mourn_inferior() TARGET_DEFAULT_FUNC(default_mourn_inferior)
virtual int insert_vfork_catchpoint(int) TARGET_DEFAULT_RETURN(1)
virtual bool thread_alive(ptid_t ptid) TARGET_DEFAULT_RETURN(false)
virtual void download_trace_state_variable(const trace_state_variable &tsv) TARGET_DEFAULT_NORETURN(tcomplain())
virtual void disconnect(const char *, int) TARGET_DEFAULT_NORETURN(tcomplain())
virtual bool set_trace_notes(const char *user, const char *notes, const char *stopnotes) TARGET_DEFAULT_RETURN(false)
virtual bool supports_enable_disable_tracepoint() TARGET_DEFAULT_RETURN(false)
virtual int insert_breakpoint(struct gdbarch *, struct bp_target_info *) TARGET_DEFAULT_NORETURN(noprocess())
virtual bool record_will_replay(ptid_t ptid, int dir) TARGET_DEFAULT_RETURN(false)
virtual int remove_fork_catchpoint(int) TARGET_DEFAULT_RETURN(1)
virtual void dumpcore(const char *filename) TARGET_DEFAULT_IGNORE()
virtual const struct frame_unwind * get_unwinder() TARGET_DEFAULT_RETURN(NULL)
virtual enum btrace_error read_btrace(struct btrace_data *data, struct btrace_target_info *btinfo, enum btrace_read_type type) TARGET_DEFAULT_NORETURN(tcomplain())
virtual const struct target_desc * read_description() TARGET_DEFAULT_RETURN(NULL)
virtual void call_history_range(ULONGEST begin, ULONGEST end, record_print_flags flags) TARGET_DEFAULT_NORETURN(tcomplain())
virtual bool supports_memory_tagging() TARGET_DEFAULT_RETURN(false)
virtual int region_ok_for_hw_watchpoint(CORE_ADDR, int) TARGET_DEFAULT_FUNC(default_region_ok_for_hw_watchpoint)
virtual bool supports_terminal_ours() TARGET_DEFAULT_RETURN(false)
virtual int upload_tracepoints(struct uploaded_tp **utpp) TARGET_DEFAULT_RETURN(0)
virtual int remove_mask_watchpoint(CORE_ADDR, CORE_ADDR, enum target_hw_bp_type) TARGET_DEFAULT_RETURN(1)
virtual bool always_non_stop_p() TARGET_DEFAULT_RETURN(false)
virtual bool supports_delete_record() TARGET_DEFAULT_RETURN(false)
virtual int remove_vfork_catchpoint(int) TARGET_DEFAULT_RETURN(1)
virtual const target_section_table * get_section_table() TARGET_DEFAULT_RETURN(default_get_section_table())
virtual void follow_exec(inferior *, ptid_t, const char *) TARGET_DEFAULT_IGNORE()
virtual bool supports_string_tracing() TARGET_DEFAULT_RETURN(false)
virtual void call_history(int size, record_print_flags flags) TARGET_DEFAULT_NORETURN(tcomplain())
virtual int set_syscall_catchpoint(int, bool, int, gdb::array_view< const int >) TARGET_DEFAULT_RETURN(1)
virtual bool has_pending_events() TARGET_DEFAULT_RETURN(false)
virtual void rcmd(const char *command, struct ui_file *output) TARGET_DEFAULT_FUNC(default_rcmd)
virtual void post_attach(int) TARGET_DEFAULT_IGNORE()
virtual bool info_proc(const char *, enum info_proc_what)
virtual bool get_tib_address(ptid_t ptid, CORE_ADDR *addr) TARGET_DEFAULT_NORETURN(tcomplain())
virtual int fileio_open(struct inferior *inf, const char *filename, int flags, int mode, int warn_if_slow, fileio_error *target_errno)
virtual int insert_exec_catchpoint(int) TARGET_DEFAULT_RETURN(1)
virtual int remove_exec_catchpoint(int) TARGET_DEFAULT_RETURN(1)
virtual bool has_execution(inferior *inf)
virtual const struct btrace_config * btrace_conf(const struct btrace_target_info *) TARGET_DEFAULT_RETURN(NULL)
virtual CORE_ADDR get_thread_local_address(ptid_t ptid, CORE_ADDR load_module_addr, CORE_ADDR offset) TARGET_DEFAULT_NORETURN(generic_tls_error())
#define target_debug_print_step(X)
static void target_debug_print_signals(gdb::array_view< const unsigned char > sigs)
std::vector< target_section > target_section_table
static void tcomplain(void)
static ptid_t default_get_ada_task_ptid(struct target_ops *self, long lwp, ULONGEST tid)
static std::string default_pid_to_str(struct target_ops *ops, ptid_t ptid)
static void default_follow_fork(struct target_ops *self, inferior *child_inf, ptid_t child_ptid, target_waitkind fork_kind, bool follow_child, bool detach_fork)
static int default_watchpoint_addr_within_range(struct target_ops *target, CORE_ADDR addr, CORE_ADDR start, int length)
static void default_mourn_inferior(struct target_ops *self)
static int dummy_find_memory_regions(struct target_ops *self, find_memory_region_ftype ignore1, void *ignore2)
static int find_default_supports_disable_randomization(struct target_ops *self)
static void generic_tls_error(void)
static gdb::unique_xmalloc_ptr< char > dummy_make_corefile_notes(struct target_ops *self, bfd *ignore1, int *ignore2)
static int default_search_memory(struct target_ops *self, CORE_ADDR start_addr, ULONGEST search_space_len, const gdb_byte *pattern, ULONGEST pattern_len, CORE_ADDR *found_addrp)
static enum exec_direction_kind default_execution_direction(struct target_ops *self)
static void default_terminal_info(struct target_ops *self, const char *args, int from_tty)
static int default_region_ok_for_hw_watchpoint(struct target_ops *self, CORE_ADDR addr, int len)
static int default_verify_memory(struct target_ops *self, const gdb_byte *data, CORE_ADDR memaddr, ULONGEST size)
static void default_rcmd(struct target_ops *self, const char *command, struct ui_file *output)
std::vector< static_tracepoint_marker > target_static_tracepoint_markers_by_strid(const char *marker_id)
void target_announce_detach(int from_tty)
struct target_ops * find_run_target(void)
LONGEST target_get_raw_trace_data(gdb_byte *buf, ULONGEST offset, LONGEST len)
int target_fileio_fstat(int fd, struct stat *sb, fileio_error *target_errno)
target_xfer_partial_ftype target_xfer_partial
int target_get_min_fast_tracepoint_insn_len()
bool may_insert_fast_tracepoints
void target_require_runnable(void)
void target_goto_record(ULONGEST insn)
bool target_get_trace_state_variable_value(int tsv, LONGEST *val)
void target_post_attach(int pid)
bool target_have_steppable_watchpoint()
int memory_validate_breakpoint(struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
gdb_byte * target_get_bookmark(const char *args, int from_tty)
void fileio_handles_invalidate_target(target_ops *targ)
void get_target_memory(struct target_ops *ops, CORE_ADDR addr, gdb_byte *buf, LONGEST len)
void target_follow_fork(inferior *inf, ptid_t child_ptid, target_waitkind fork_kind, bool follow_child, bool detach_fork)
bool target_filesystem_is_local()
std::unique_ptr< struct target_ops, target_unpusher > target_unpush_up
const gdb_byte const_gdb_byte
bool target_supports_dumpcore()
void target_set_circular_trace_buffer(int val)
int target_insert_hw_breakpoint(gdbarch *gdbarch, bp_target_info *bp_tgt)
void target_goto_bookmark(const gdb_byte *arg, int from_tty)
void target_set_disconnected_tracing(int val)
int memory_remove_breakpoint(struct target_ops *, struct gdbarch *, struct bp_target_info *, enum remove_bp_reason)
int target_read_code(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
struct target_ops * find_attach_target(void)
int target_region_ok_for_hw_watchpoint(CORE_ADDR addr, int len)
@ TARGET_XFER_UNAVAILABLE
void default_target_pass_ctrlc(struct target_ops *ops)
void async_callback_ftype(enum inferior_event_type event_type, void *context)
enum record_method target_record_method(ptid_t ptid)
void add_target(const target_info &info, target_open_ftype *func, completer_ftype *completer=NULL)
void target_call_history_from(ULONGEST begin, int size, record_print_flags flags)
int target_upload_trace_state_variables(uploaded_tsv **utsvp)
enum target_xfer_status target_xfer_partial_ftype(struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, ULONGEST len, ULONGEST *xfered_len)
bool target_store_memtags(CORE_ADDR address, size_t len, const gdb::byte_vector &tags, int type)
gdb::array_view< const gdb_byte > target_thread_info_to_thread_handle(struct thread_info *)
ptid_t target_get_ada_task_ptid(long lwp, ULONGEST tid)
void target_insn_history_range(ULONGEST begin, ULONGEST end, gdb_disassembly_flags flags)
bool target_has_pending_events()
void noprocess(void) ATTRIBUTE_NORETURN
int target_remove_exec_catchpoint(int pid)
void target_log_command(const char *p)
exec_direction_kind target_execution_direction()
void target_pre_inferior(int)
int target_fileio_pwrite(int fd, const gdb_byte *write_buf, int len, ULONGEST offset, fileio_error *target_errno)
target_ops * get_native_target()
int target_can_do_single_step()
void target_insn_history(int size, gdb_disassembly_flags flags)
int target_trace_find(trace_find_type type, int num, CORE_ADDR addr1, CORE_ADDR addr2, int *tpp)
void target_async(bool enable)
gdb::unique_xmalloc_ptr< char > target_fileio_read_stralloc(struct inferior *inf, const char *filename)
void target_stop_recording(void)
const struct frame_unwind * target_get_tailcall_unwinder(void)
int target_remove_hw_breakpoint(gdbarch *gdbarch, bp_target_info *bp_tgt)
struct address_space * target_thread_address_space(ptid_t)
bool target_supports_stopped_by_hw_breakpoint()
void target_goto_record_end(void)
bool target_can_run_breakpoint_commands()
bool target_supports_memory_tagging()
void target_disconnect(const char *, int)
bool target_supports_terminal_ours(void)
void target_trace_start()
bool target_can_execute_reverse()
void target_enable_tracepoint(bp_location *loc)
void target_done_generating_core(void)
void target_call_history(int size, record_print_flags flags)
gdb::optional< gdb::char_vector > target_get_osdata(const char *type)
int target_record_is_replaying(ptid_t ptid)
int target_fileio_open(struct inferior *inf, const char *filename, int flags, int mode, bool warn_if_slow, fileio_error *target_errno)
int target_insert_breakpoint(struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
void target_insn_history_from(ULONGEST from, int size, gdb_disassembly_flags flags)
gdb::optional< gdb::char_vector > target_read_stralloc(struct target_ops *ops, enum target_object object, const char *annex)
int target_remove_fork_catchpoint(int pid)
int memory_insert_breakpoint(struct target_ops *, struct gdbarch *, struct bp_target_info *)
scoped_restore_tmpl< int > make_scoped_restore_show_memory_breakpoints(int show)
enum auto_boolean target_non_stop_enabled
void target_open_ftype(const char *args, int from_tty)
const char * target_pid_to_exec_file(int pid)
int target_insert_mask_watchpoint(CORE_ADDR, CORE_ADDR, enum target_hw_bp_type)
void flash_erase_command(const char *cmd, int from_tty)
bool target_async_permitted
const struct target_section * target_section_by_addr(struct target_ops *target, CORE_ADDR addr)
void target_detach(inferior *inf, int from_tty)
bool target_can_download_tracepoint()
int target_insert_watchpoint(CORE_ADDR addr, int len, target_hw_bp_type type, expression *cond)
void target_fetch_registers(struct regcache *regcache, int regno)
std::vector< memory_read_result > read_memory_robust(struct target_ops *ops, const ULONGEST offset, const LONGEST len)
int target_fileio_close(int fd, fileio_error *target_errno)
#define TARGET_DEFAULT_FUNC(ARG)
bool target_can_async_p()
bool target_static_tracepoint_marker_at(CORE_ADDR addr, static_tracepoint_marker *marker)
int default_memory_remove_breakpoint(struct gdbarch *, struct bp_target_info *)
void target_disable_btrace(struct btrace_target_info *btinfo)
bool target_can_use_agent()
void target_pass_signals(gdb::array_view< const unsigned char > pass_signals)
int target_fileio_pread(int fd, gdb_byte *read_buf, int len, ULONGEST offset, fileio_error *target_errno)
enum target_xfer_status raw_memory_xfer_partial(struct target_ops *ops, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST memaddr, LONGEST len, ULONGEST *xfered_len)
const char * target_xfer_status_to_string(enum target_xfer_status status)
bool target_can_lock_scheduler()
gdb::unique_xmalloc_ptr< char > target_make_corefile_notes(bfd *bfd, int *size_p)
gdbarch * target_thread_architecture(ptid_t ptid)
traceframe_info_up target_traceframe_info()
x86_xsave_layout target_fetch_x86_xsave_layout()
LONGEST target_fileio_read_alloc(struct inferior *inf, const char *filename, gdb_byte **buf_p)
int target_read_stack(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
int target_core_of_thread(ptid_t ptid)
void target_update_thread_list(void)
int target_supports_delete_record(void)
void add_deprecated_target_alias(const target_info &info, const char *alias)
void target_prepare_to_store(regcache *regcache)
void target_program_signals(gdb::array_view< const unsigned char > program_signals)
void target_record_stop_replaying(void)
int target_upload_tracepoints(uploaded_tp **utpp)
int target_info_proc(const char *, enum info_proc_what)
int target_remove_mask_watchpoint(CORE_ADDR, CORE_ADDR, enum target_hw_bp_type)
bool target_stopped_by_hw_breakpoint()
struct btrace_target_info * target_enable_btrace(thread_info *tp, const struct btrace_config *)
int target_can_use_hardware_watchpoint(bptype type, int cnt, int othertype)
void target_dumpcore(const char *filename)
bool target_use_agent(bool use)
void target_call_history_range(ULONGEST begin, ULONGEST end, record_print_flags flags)
#define TARGET_DEFAULT_NORETURN(ARG)
void target_store_registers(struct regcache *regcache, int regs)
void target_commit_resumed()
bool target_has_execution(inferior *inf=nullptr)
#define TARGET_DEBUG_PRINTER(FUNC)
target_ops * get_dummy_target()
void target_disable_tracepoint(bp_location *loc)
#define TARGET_DEFAULT_RETURN(ARG)
void target_trace_set_readonly_regions()
void target_download_tracepoint(bp_location *location)
int target_write_memory_blocks(const std::vector< memory_write_request > &requests, enum flash_preserve_mode preserve_flash_p, void(*progress_cb)(ULONGEST, void *))
int target_insert_exec_catchpoint(int pid)
void target_download_trace_state_variable(const trace_state_variable &tsv)
int target_record_will_replay(ptid_t ptid, int dir)
bool target_supports_stopped_by_sw_breakpoint()
int target_get_trace_status(trace_status *ts)
int target_read_raw_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
const target_section_table * target_get_section_table(struct target_ops *target)
int target_insert_fork_catchpoint(int pid)
ptid_t default_target_wait(struct target_ops *ops, ptid_t ptid, struct target_waitstatus *status, target_wait_flags options)
void target_save_record(const char *filename)
void target_flash_erase(ULONGEST address, LONGEST length)
int default_memory_insert_breakpoint(struct gdbarch *, struct bp_target_info *)
int target_masked_watch_num_registers(CORE_ADDR addr, CORE_ADDR mask)
struct thread_info * target_thread_handle_to_thread_info(const gdb_byte *thread_handle, int handle_len, struct inferior *inf)
int target_has_registers()
gdb::optional< gdb::byte_vector > target_read_alloc(struct target_ops *ops, enum target_object object, const char *annex)
int simple_verify_memory(struct target_ops *ops, const gdb_byte *data, CORE_ADDR memaddr, ULONGEST size)
void target_prepare_to_generate_core(void)
bool target_attach_no_wait()
void set_native_target(target_ops *target)
@ TARGET_OBJECT_UNWIND_TABLE
@ TARGET_OBJECT_AVAILABLE_FEATURES
@ TARGET_OBJECT_LIBRARIES_SVR4
@ TARGET_OBJECT_BTRACE_CONF
@ TARGET_OBJECT_LIBRARIES_AIX
@ TARGET_OBJECT_TRACEFRAME_INFO
@ TARGET_OBJECT_RAW_MEMORY
@ TARGET_OBJECT_DARWIN_DYLD_INFO
@ TARGET_OBJECT_FREEBSD_PS_STRINGS
@ TARGET_OBJECT_STACK_MEMORY
@ TARGET_OBJECT_SIGNAL_INFO
@ TARGET_OBJECT_OPENVMS_UIB
@ TARGET_OBJECT_CODE_MEMORY
@ TARGET_OBJECT_EXEC_FILE
@ TARGET_OBJECT_FREEBSD_VMMAP
@ TARGET_OBJECT_MEMORY_MAP
@ TARGET_OBJECT_LIBRARIES
@ TARGET_OBJECT_STATIC_TRACE_DATA
void target_thread_events(int enable)
void target_stop(ptid_t ptid)
void target_announce_attach(int from_tty, int pid)
void target_teardown_btrace(struct btrace_target_info *btinfo)
std::string target_options_to_string(target_wait_flags target_options)
LONGEST target_read(struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *buf, ULONGEST offset, LONGEST len)
bool target_supports_string_tracing()
const struct frame_unwind * target_get_unwinder(void)
const char * target_extra_thread_info(thread_info *tp)
void target_set_permissions()
bool target_is_non_stop_p()
bool exists_non_stop_target()
void target_flash_done(void)
void initialize_targets(void)
void target_set_trace_buffer_size(LONGEST val)
bool may_insert_tracepoints
bool target_fetch_memtags(CORE_ADDR address, size_t len, gdb::byte_vector &tags, int type)
int target_remove_breakpoint(struct gdbarch *gdbarch, struct bp_target_info *bp_tgt, enum remove_bp_reason reason)
std::string target_pid_to_str(ptid_t ptid)
bool target_can_accel_watchpoint_condition(CORE_ADDR addr, int len, int type, expression *cond)
void target_resume(ptid_t scope_ptid, int step, enum gdb_signal signal)
LONGEST target_write_with_progress(struct target_ops *ops, enum target_object object, const char *annex, const gdb_byte *buf, ULONGEST offset, LONGEST len, void(*progress)(ULONGEST, void *), void *baton)
thread_control_capabilities
enum btrace_error target_read_btrace(struct btrace_data *, struct btrace_target_info *, enum btrace_read_type)
std::string normal_pid_to_str(ptid_t ptid)
struct target_ops * find_target_at(enum strata stratum)
bool target_get_tib_address(ptid_t ptid, CORE_ADDR *addr)
bool may_insert_breakpoints
int target_ranged_break_num_registers(void)
int target_fileio_unlink(struct inferior *inf, const char *filename, fileio_error *target_errno)
bool target_stopped_by_watchpoint()
std::vector< mem_region > target_memory_map(void)
void target_get_tracepoint_status(tracepoint *tp, uploaded_tp *utp)
const char * target_thread_name(struct thread_info *)
const target_section_table * default_get_section_table()
int target_search_memory(CORE_ADDR start_addr, ULONGEST search_space_len, const gdb_byte *pattern, ULONGEST pattern_len, CORE_ADDR *found_addrp)
void target_goto_record_begin(void)
std::unique_ptr< target_ops, target_ops_deleter > target_ops_up
const struct target_desc * target_read_description(struct target_ops *)
gdb::optional< std::string > target_fileio_readlink(struct inferior *inf, const char *filename, fileio_error *target_errno)
void target_rcmd(const char *command, struct ui_file *outbuf)
int target_insert_vfork_catchpoint(int pid)
int target_write_raw_memory(CORE_ADDR memaddr, const gdb_byte *myaddr, ssize_t len)
LONGEST target_write(struct target_ops *ops, enum target_object object, const char *annex, const gdb_byte *buf, ULONGEST offset, LONGEST len)
ULONGEST get_target_memory_unsigned(struct target_ops *ops, CORE_ADDR addr, int len, enum bfd_endian byte_order)
bool target_stopped_by_sw_breakpoint()
CORE_ADDR target_translate_tls_address(struct objfile *objfile, CORE_ADDR offset)
const struct btrace_config * target_btrace_conf(const struct btrace_target_info *)
void target_load(const char *arg, int from_tty)
bool target_supports_evaluation_of_breakpoint_conditions()
bool target_supports_enable_disable_tracepoint()
gdb::ref_ptr< target_ops, target_ops_ref_policy > target_ops_ref
bool target_augmented_libraries_svr4_read()
void target_delete_record(void)
int target_remove_vfork_catchpoint(int pid)
void target_pass_ctrlc(void)
const char * target_shortname()
void target_follow_exec(inferior *follow_inf, ptid_t ptid, const char *execd_pathname)
bool target_set_trace_notes(const char *user, const char *notes, const char *stopnotes)
#define TARGET_DEFAULT_IGNORE()
int target_find_memory_regions(find_memory_region_ftype func, void *data)
int target_remove_watchpoint(CORE_ADDR addr, int len, target_hw_bp_type type, expression *cond)
int target_thread_alive(ptid_t ptid)
int target_supports_disable_randomization(void)
int target_set_syscall_catchpoint(int pid, bool needed, int any_count, gdb::array_view< const int > syscall_counts)
int target_save_trace_data(const char *filename)
void update_target_permissions(void)
int target_verify_memory(const gdb_byte *data, CORE_ADDR memaddr, ULONGEST size)
std::unique_ptr< traceframe_info > traceframe_info_up