to xfree everything (including the "struct target_ops"). */
void (*to_xclose) (struct target_ops *targ);
void (*to_close) (struct target_ops *);
- void (*to_attach) (struct target_ops *ops, char *, int);
- void (*to_post_attach) (struct target_ops *, int);
- void (*to_detach) (struct target_ops *ops, const char *, int);
+ void (*to_attach) (struct target_ops *ops, char *, int)
+ TARGET_DEFAULT_FUNC (find_default_attach);
+ void (*to_post_attach) (struct target_ops *, int)
+ TARGET_DEFAULT_IGNORE ();
+ void (*to_detach) (struct target_ops *ops, const char *, int)
+ TARGET_DEFAULT_IGNORE ();
void (*to_disconnect) (struct target_ops *, char *, int);
void (*to_resume) (struct target_ops *, ptid_t, int, enum gdb_signal)
TARGET_DEFAULT_NORETURN (noprocess ());
void (*to_fetch_registers) (struct target_ops *, struct regcache *, int);
void (*to_store_registers) (struct target_ops *, struct regcache *, int)
TARGET_DEFAULT_NORETURN (noprocess ());
- void (*to_prepare_to_store) (struct target_ops *, struct regcache *);
+ void (*to_prepare_to_store) (struct target_ops *, struct regcache *)
+ TARGET_DEFAULT_NORETURN (noprocess ());
/* Transfer LEN bytes of memory between GDB address MYADDR and
target address MEMADDR. If WRITE, transfer them to the target, else
struct mem_attrib *attrib,
struct target_ops *target);
- void (*to_files_info) (struct target_ops *);
+ void (*to_files_info) (struct target_ops *)
+ TARGET_DEFAULT_IGNORE ();
int (*to_insert_breakpoint) (struct target_ops *, struct gdbarch *,
struct bp_target_info *)
TARGET_DEFAULT_FUNC (memory_insert_breakpoint);
int (*to_remove_breakpoint) (struct target_ops *, struct gdbarch *,
struct bp_target_info *)
TARGET_DEFAULT_FUNC (memory_remove_breakpoint);
- int (*to_can_use_hw_breakpoint) (struct target_ops *, int, int, int);
+ int (*to_can_use_hw_breakpoint) (struct target_ops *, int, int, int)
+ TARGET_DEFAULT_RETURN (0);
int (*to_ranged_break_num_registers) (struct target_ops *);
int (*to_insert_hw_breakpoint) (struct target_ops *,
- struct gdbarch *, struct bp_target_info *);
+ struct gdbarch *, struct bp_target_info *)
+ TARGET_DEFAULT_RETURN (-1);
int (*to_remove_hw_breakpoint) (struct target_ops *,
- struct gdbarch *, struct bp_target_info *);
+ struct gdbarch *, struct bp_target_info *)
+ TARGET_DEFAULT_RETURN (-1);
/* Documentation of what the two routines below are expected to do is
provided with the corresponding target_* macros. */
int (*to_remove_watchpoint) (struct target_ops *,
- CORE_ADDR, int, int, struct expression *);
+ CORE_ADDR, int, int, struct expression *)
+ TARGET_DEFAULT_RETURN (-1);
int (*to_insert_watchpoint) (struct target_ops *,
- CORE_ADDR, int, int, struct expression *);
+ CORE_ADDR, int, int, struct expression *)
+ TARGET_DEFAULT_RETURN (-1);
int (*to_insert_mask_watchpoint) (struct target_ops *,
CORE_ADDR, CORE_ADDR, int);
int (*to_stopped_data_address) (struct target_ops *, CORE_ADDR *)
TARGET_DEFAULT_RETURN (0);
int (*to_watchpoint_addr_within_range) (struct target_ops *,
- CORE_ADDR, CORE_ADDR, int);
+ CORE_ADDR, CORE_ADDR, int)
+ TARGET_DEFAULT_FUNC (default_watchpoint_addr_within_range);
/* Documentation of this routine is provided with the corresponding
target_* macro. */
int (*to_region_ok_for_hw_watchpoint) (struct target_ops *,
- CORE_ADDR, int);
+ CORE_ADDR, int)
+ TARGET_DEFAULT_FUNC (default_region_ok_for_hw_watchpoint);
int (*to_can_accel_watchpoint_condition) (struct target_ops *,
CORE_ADDR, int, int,
- struct expression *);
+ struct expression *)
+ TARGET_DEFAULT_RETURN (0);
int (*to_masked_watch_num_registers) (struct target_ops *,
CORE_ADDR, CORE_ADDR);
- void (*to_terminal_init) (struct target_ops *);
- void (*to_terminal_inferior) (struct target_ops *);
- void (*to_terminal_ours_for_output) (struct target_ops *);
- void (*to_terminal_ours) (struct target_ops *);
- void (*to_terminal_save_ours) (struct target_ops *);
- void (*to_terminal_info) (struct target_ops *, const char *, int);
+ void (*to_terminal_init) (struct target_ops *)
+ TARGET_DEFAULT_IGNORE ();
+ void (*to_terminal_inferior) (struct target_ops *)
+ TARGET_DEFAULT_IGNORE ();
+ void (*to_terminal_ours_for_output) (struct target_ops *)
+ TARGET_DEFAULT_IGNORE ();
+ void (*to_terminal_ours) (struct target_ops *)
+ TARGET_DEFAULT_IGNORE ();
+ void (*to_terminal_save_ours) (struct target_ops *)
+ TARGET_DEFAULT_IGNORE ();
+ void (*to_terminal_info) (struct target_ops *, const char *, int)
+ TARGET_DEFAULT_FUNC (default_terminal_info);
void (*to_kill) (struct target_ops *);
- void (*to_load) (struct target_ops *, char *, int);
+ void (*to_load) (struct target_ops *, char *, int)
+ TARGET_DEFAULT_NORETURN (tcomplain ());
void (*to_create_inferior) (struct target_ops *,
char *, char *, char **, int);
- void (*to_post_startup_inferior) (struct target_ops *, ptid_t);
- int (*to_insert_fork_catchpoint) (struct target_ops *, int);
- int (*to_remove_fork_catchpoint) (struct target_ops *, int);
- int (*to_insert_vfork_catchpoint) (struct target_ops *, int);
- int (*to_remove_vfork_catchpoint) (struct target_ops *, int);
+ void (*to_post_startup_inferior) (struct target_ops *, ptid_t)
+ TARGET_DEFAULT_IGNORE ();
+ int (*to_insert_fork_catchpoint) (struct target_ops *, int)
+ TARGET_DEFAULT_RETURN (1);
+ int (*to_remove_fork_catchpoint) (struct target_ops *, int)
+ TARGET_DEFAULT_RETURN (1);
+ int (*to_insert_vfork_catchpoint) (struct target_ops *, int)
+ TARGET_DEFAULT_RETURN (1);
+ int (*to_remove_vfork_catchpoint) (struct target_ops *, int)
+ TARGET_DEFAULT_RETURN (1);
int (*to_follow_fork) (struct target_ops *, int, int);
- int (*to_insert_exec_catchpoint) (struct target_ops *, int);
- int (*to_remove_exec_catchpoint) (struct target_ops *, int);
+ int (*to_insert_exec_catchpoint) (struct target_ops *, int)
+ TARGET_DEFAULT_RETURN (1);
+ int (*to_remove_exec_catchpoint) (struct target_ops *, int)
+ TARGET_DEFAULT_RETURN (1);
int (*to_set_syscall_catchpoint) (struct target_ops *,
- int, int, int, int, int *);
- int (*to_has_exited) (struct target_ops *, int, int, int *);
+ int, int, int, int, int *)
+ TARGET_DEFAULT_RETURN (1);
+ int (*to_has_exited) (struct target_ops *, int, int, int *)
+ TARGET_DEFAULT_RETURN (0);
void (*to_mourn_inferior) (struct target_ops *);
int (*to_can_run) (struct target_ops *);
char *(*to_thread_name) (struct target_ops *, struct thread_info *);
void (*to_stop) (struct target_ops *, ptid_t);
void (*to_rcmd) (struct target_ops *,
- char *command, struct ui_file *output);
+ char *command, struct ui_file *output)
+ TARGET_DEFAULT_FUNC (default_rcmd);
char *(*to_pid_to_exec_file) (struct target_ops *, int pid);
void (*to_log_command) (struct target_ops *, const char *);
struct target_section_table *(*to_get_section_table) (struct target_ops *);
void (*to_delete_record) (struct target_ops *);
/* Query if the record target is currently replaying. */
- int (*to_record_is_replaying) (void);
+ int (*to_record_is_replaying) (struct target_ops *);
/* Go to the begin of the execution trace. */
- void (*to_goto_record_begin) (void);
+ void (*to_goto_record_begin) (struct target_ops *);
/* Go to the end of the execution trace. */
- void (*to_goto_record_end) (void);
+ void (*to_goto_record_end) (struct target_ops *);
/* Go to a specific location in the recorded execution trace. */
- void (*to_goto_record) (ULONGEST insn);
+ void (*to_goto_record) (struct target_ops *, ULONGEST insn);
/* Disassemble SIZE instructions in the recorded execution trace from
the current position.
If SIZE < 0, disassemble abs (SIZE) preceding instructions; otherwise,
disassemble SIZE succeeding instructions. */
- void (*to_insn_history) (int size, int flags);
+ void (*to_insn_history) (struct target_ops *, int size, int flags);
/* Disassemble SIZE instructions in the recorded execution trace around
FROM.
If SIZE < 0, disassemble abs (SIZE) instructions before FROM; otherwise,
disassemble SIZE instructions after FROM. */
- void (*to_insn_history_from) (ULONGEST from, int size, int flags);
+ void (*to_insn_history_from) (struct target_ops *,
+ ULONGEST from, int size, int flags);
/* Disassemble a section of the recorded execution trace from instruction
BEGIN (inclusive) to instruction END (inclusive). */
- void (*to_insn_history_range) (ULONGEST begin, ULONGEST end, int flags);
+ void (*to_insn_history_range) (struct target_ops *,
+ ULONGEST begin, ULONGEST end, int flags);
/* Print a function trace of the recorded execution trace.
If SIZE < 0, print abs (SIZE) preceding functions; otherwise, print SIZE
succeeding functions. */
- void (*to_call_history) (int size, int flags);
+ void (*to_call_history) (struct target_ops *, int size, int flags);
/* Print a function trace of the recorded execution trace starting
at function FROM.
If SIZE < 0, print abs (SIZE) functions before FROM; otherwise, print
SIZE functions after FROM. */
- void (*to_call_history_from) (ULONGEST begin, int size, int flags);
+ void (*to_call_history_from) (struct target_ops *,
+ ULONGEST begin, int size, int flags);
/* Print a function trace of an execution trace section from function BEGIN
(inclusive) to function END (inclusive). */
- void (*to_call_history_range) (ULONGEST begin, ULONGEST end, int flags);
+ void (*to_call_history_range) (struct target_ops *,
+ ULONGEST begin, ULONGEST end, int flags);
/* Nonzero if TARGET_OBJECT_LIBRARIES_SVR4 may be read with a
non-empty annex. */
- int (*to_augmented_libraries_svr4_read) (void);
+ int (*to_augmented_libraries_svr4_read) (struct target_ops *);
/* Those unwinders are tried before any other arch unwinders. Use NULL if
it is not used. */
(*current_target.to_can_use_agent) (¤t_target)
#define target_augmented_libraries_svr4_read() \
- (*current_target.to_augmented_libraries_svr4_read) ()
+ (*current_target.to_augmented_libraries_svr4_read) (¤t_target)
/* Command logging facility. */