/* The direction the target is currently executing. Must be
implemented on targets that support reverse execution and async
mode. The default simply returns forward execution. */
- enum exec_direction_kind (*to_execution_direction) (void);
+ enum exec_direction_kind (*to_execution_direction) (struct target_ops *);
/* Does this target support debugging multiple processes
simultaneously? */
- int (*to_supports_multi_process) (void);
+ int (*to_supports_multi_process) (struct target_ops *);
/* Does this target support enabling and disabling tracepoints while a trace
experiment is running? */
- int (*to_supports_enable_disable_tracepoint) (void);
+ int (*to_supports_enable_disable_tracepoint) (struct target_ops *);
/* Does this target support disabling address space randomization? */
- int (*to_supports_disable_randomization) (void);
+ int (*to_supports_disable_randomization) (struct target_ops *);
/* Does this target support the tracenz bytecode for string collection? */
- int (*to_supports_string_tracing) (void);
+ int (*to_supports_string_tracing) (struct target_ops *);
/* Does this target support evaluation of breakpoint conditions on its
end? */
- int (*to_supports_evaluation_of_breakpoint_conditions) (void);
+ int (*to_supports_evaluation_of_breakpoint_conditions) (struct target_ops *);
/* Does this target support evaluation of breakpoint commands on its
end? */
- int (*to_can_run_breakpoint_commands) (void);
+ int (*to_can_run_breakpoint_commands) (struct target_ops *);
/* Determine current architecture of thread PTID.
/* Open FILENAME on the target, using FLAGS and MODE. Return a
target file descriptor, or -1 if an error occurs (and set
*TARGET_ERRNO). */
- int (*to_fileio_open) (const char *filename, int flags, int mode,
+ int (*to_fileio_open) (struct target_ops *,
+ const char *filename, int flags, int mode,
int *target_errno);
/* Write up to LEN bytes from WRITE_BUF to FD on the target.
Return the number of bytes written, or -1 if an error occurs
(and set *TARGET_ERRNO). */
- int (*to_fileio_pwrite) (int fd, const gdb_byte *write_buf, int len,
+ int (*to_fileio_pwrite) (struct target_ops *,
+ int fd, const gdb_byte *write_buf, int len,
ULONGEST offset, int *target_errno);
/* Read up to LEN bytes FD on the target into READ_BUF.
Return the number of bytes read, or -1 if an error occurs
(and set *TARGET_ERRNO). */
- int (*to_fileio_pread) (int fd, gdb_byte *read_buf, int len,
+ int (*to_fileio_pread) (struct target_ops *,
+ int fd, gdb_byte *read_buf, int len,
ULONGEST offset, int *target_errno);
/* Close FD on the target. Return 0, or -1 if an error occurs
(and set *TARGET_ERRNO). */
- int (*to_fileio_close) (int fd, int *target_errno);
+ int (*to_fileio_close) (struct target_ops *, int fd, int *target_errno);
/* Unlink FILENAME on the target. Return 0, or -1 if an error
occurs (and set *TARGET_ERRNO). */
- int (*to_fileio_unlink) (const char *filename, int *target_errno);
+ int (*to_fileio_unlink) (struct target_ops *,
+ const char *filename, int *target_errno);
/* Read value of symbolic link FILENAME on the target. Return a
null-terminated string allocated via xmalloc, or NULL if an error
occurs (and set *TARGET_ERRNO). */
- char *(*to_fileio_readlink) (const char *filename, int *target_errno);
+ char *(*to_fileio_readlink) (struct target_ops *,
+ const char *filename, int *target_errno);
/* Implement the "info proc" command. */
/* Tracepoint-related operations. */
/* Prepare the target for a tracing run. */
- void (*to_trace_init) (void);
+ void (*to_trace_init) (struct target_ops *);
/* Send full details of a tracepoint location to the target. */
void (*to_download_tracepoint) (struct bp_location *location);
simultaneously. */
#define target_supports_multi_process() \
- (*current_target.to_supports_multi_process) ()
+ (*current_target.to_supports_multi_process) (¤t_target)
/* Returns true if this target can disable address space randomization. */
while a trace experiment is running. */
#define target_supports_enable_disable_tracepoint() \
- (*current_target.to_supports_enable_disable_tracepoint) ()
+ (*current_target.to_supports_enable_disable_tracepoint) (¤t_target)
#define target_supports_string_tracing() \
- (*current_target.to_supports_string_tracing) ()
+ (*current_target.to_supports_string_tracing) (¤t_target)
/* Returns true if this target can handle breakpoint conditions
on its end. */
#define target_supports_evaluation_of_breakpoint_conditions() \
- (*current_target.to_supports_evaluation_of_breakpoint_conditions) ()
+ (*current_target.to_supports_evaluation_of_breakpoint_conditions) (¤t_target)
/* Returns true if this target can handle breakpoint commands
on its end. */
#define target_can_run_breakpoint_commands() \
- (*current_target.to_can_run_breakpoint_commands) ()
+ (*current_target.to_can_run_breakpoint_commands) (¤t_target)
extern int target_read_string (CORE_ADDR, char **, int, int *);
(current_target.to_async (¤t_target, (CALLBACK), (CONTEXT)))
#define target_execution_direction() \
- (current_target.to_execution_direction ())
+ (current_target.to_execution_direction (¤t_target))
/* Converts a process id to a string. Usually, the string just contains
`process xyz', but on some systems it may contain
/* Tracepoint-related operations. */
#define target_trace_init() \
- (*current_target.to_trace_init) ()
+ (*current_target.to_trace_init) (¤t_target)
#define target_download_tracepoint(t) \
(*current_target.to_download_tracepoint) (t)