38 #include <sys/types.h>
131 printf_filtered (
"Done. Use the \"run\" command to start a process.\n");
146 error (
_(
"Argument given to \"disconnect\"."));
212 int flags,
int mode,
int warn_if_slow,
222 *target_errno = FILEIO_EINVAL;
243 ret = pwrite (fd, write_buf, len, (
long) offset);
250 ret = lseek (fd, (
long) offset,
SEEK_SET);
252 ret = write (fd, write_buf, len);
271 ret = pread (fd, read_buf, len, (
long) offset);
278 ret = lseek (fd, (
long) offset,
SEEK_SET);
280 ret =
read (fd, read_buf, len);
293 struct stat *sb,
int *target_errno)
297 ret = fstat (fd, sb);
327 ret = unlink (filename);
343 #if defined (PATH_MAX)
348 len = readlink (filename, buf,
sizeof buf);
356 memcpy (ret, buf, len);
360 *target_errno = FILEIO_ENOSYS;
399 t->
to_doc =
"Native process (started by the \"run\" command).";
int(* to_fileio_pread)(struct target_ops *, int fd, gdb_byte *read_buf, int len, ULONGEST offset, int *target_errno)
static int inf_child_explicitly_opened
int default_child_has_stack(struct target_ops *ops)
ssize_t read(int fd, void *buf, size_t count)
void child_terminal_info(struct target_ops *self, const char *, int)
int(* to_fileio_close)(struct target_ops *, int fd, int *target_errno)
static void inf_child_post_startup_inferior(struct target_ops *self, ptid_t ptid)
struct gdbarch * get_regcache_arch(const struct regcache *regcache)
int(* to_has_memory)(struct target_ops *)
int fileio_to_host_mode(int fileio_mode, mode_t *mode_p)
int(* to_has_stack)(struct target_ops *)
void(* to_terminal_init)(struct target_ops *) TARGET_DEFAULT_IGNORE()
void push_target(struct target_ops *t)
int(* to_insert_breakpoint)(struct target_ops *, struct gdbarch *, struct bp_target_info *) TARGET_DEFAULT_FUNC(memory_insert_breakpoint)
static int inf_child_fileio_pwrite(struct target_ops *self, int fd, const gdb_byte *write_buf, int len, ULONGEST offset, int *target_errno)
int unpush_target(struct target_ops *t)
int(* to_follow_fork)(struct target_ops *, int, int) TARGET_DEFAULT_FUNC(default_follow_fork)
void(* to_terminal_ours_for_output)(struct target_ops *) TARGET_DEFAULT_IGNORE()
void generic_mourn_inferior(void)
void(* to_close)(struct target_ops *)
void child_terminal_inferior(struct target_ops *self)
void child_terminal_ours_for_output(struct target_ops *self)
static int inf_child_fileio_unlink(struct target_ops *self, struct inferior *inf, const char *filename, int *target_errno)
int(* to_remove_breakpoint)(struct target_ops *, struct gdbarch *, struct bp_target_info *) TARGET_DEFAULT_FUNC(memory_remove_breakpoint)
static int inf_child_follow_fork(struct target_ops *ops, int follow_child, int detach_fork)
int gdbarch_num_regs(struct gdbarch *gdbarch)
int default_child_has_execution(struct target_ops *ops, ptid_t the_ptid)
void inf_child_maybe_unpush_target(struct target_ops *ops)
void child_terminal_ours(struct target_ops *self)
static int inf_child_use_agent(struct target_ops *self, int use)
void printf_filtered(const char *format,...)
int fileio_to_host_openflags(int fileio_open_flags, int *open_flags_p)
mach_port_t kern_return_t mach_port_t msgports 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
int default_child_has_memory(struct target_ops *ops)
static int inf_child_fileio_fstat(struct target_ops *self, int fd, struct stat *sb, int *target_errno)
static void inf_child_store_inferior_registers(struct target_ops *ops, struct regcache *regcache, int regnum)
static void inf_child_fetch_inferior_registers(struct target_ops *ops, struct regcache *regcache, int regnum)
static void inf_child_open(const char *arg, int from_tty)
int(* to_can_run)(struct target_ops *) TARGET_DEFAULT_RETURN(0)
int host_to_fileio_error(int error)
int default_child_has_all_memory(struct target_ops *ops)
void store_waitstatus(struct target_waitstatus *ourstatus, int hoststatus)
union target_waitstatus::@161 value
static int inf_child_fileio_open(struct target_ops *self, struct inferior *inf, const char *filename, int flags, int mode, int warn_if_slow, int *target_errno)
int(* to_has_execution)(struct target_ops *, ptid_t)
void inf_child_open_target(struct target_ops *target, const char *arg, int from_tty)
enum gdb_signal gdb_signal_from_host(int)
int(* to_fileio_fstat)(struct target_ops *, int fd, struct stat *sb, int *target_errno)
static void inf_child_post_attach(struct target_ops *self, int pid)
static void inf_child_disconnect(struct target_ops *target, const char *args, int from_tty)
void inf_child_mourn_inferior(struct target_ops *ops)
char *(* to_pid_to_exec_file)(struct target_ops *, int pid) TARGET_DEFAULT_RETURN(NULL)
static int inf_child_fileio_pread(struct target_ops *self, int fd, gdb_byte *read_buf, int len, ULONGEST offset, int *target_errno)
static int return_zero(struct target_ops *ignore)
void(* to_disconnect)(struct target_ops *, const char *, int) TARGET_DEFAULT_NORETURN(tcomplain())
int(* to_fileio_open)(struct target_ops *, struct inferior *inf, const char *filename, int flags, int mode, int warn_if_slow, int *target_errno)
static void inf_child_close(struct target_ops *target)
struct target_ops * inf_child_target(void)
static int inf_child_fileio_close(struct target_ops *self, int fd, int *target_errno)
void(* to_fetch_registers)(struct target_ops *, struct regcache *, int) TARGET_DEFAULT_IGNORE()
int default_child_has_registers(struct target_ops *ops)
int(* to_fileio_pwrite)(struct target_ops *, int fd, const gdb_byte *write_buf, int len, ULONGEST offset, int *target_errno)
enum target_waitkind kind
static char * inf_child_pid_to_exec_file(struct target_ops *self, int pid)
void(* to_open)(const char *, int)
void(* to_post_attach)(struct target_ops *, int) TARGET_DEFAULT_IGNORE()
int(* to_can_async_p)(struct target_ops *) TARGET_DEFAULT_RETURN(0)
static int inf_child_can_run(struct target_ops *self)
void(* to_terminal_ours)(struct target_ops *) TARGET_DEFAULT_IGNORE()
int gdb_open_cloexec(const char *filename, int flags, unsigned long mode)
void regcache_raw_supply(struct regcache *regcache, int regnum, const void *buf)
static void inf_child_prepare_to_store(struct target_ops *self, struct regcache *regcache)
void(* to_terminal_inferior)(struct target_ops *) TARGET_DEFAULT_IGNORE()
const char * to_shortname
unsigned long long ULONGEST
static int ignore(struct target_ops *ops, struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
static char * inf_child_fileio_readlink(struct target_ops *self, struct inferior *inf, const char *filename, int *target_errno)
int(* to_supports_non_stop)(struct target_ops *) TARGET_DEFAULT_RETURN(0)
int memory_insert_breakpoint(struct target_ops *ops, struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
int(* to_has_all_memory)(struct target_ops *)
int memory_remove_breakpoint(struct target_ops *ops, struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
int(* to_fileio_unlink)(struct target_ops *, struct inferior *inf, const char *filename, int *target_errno)
void child_terminal_init(struct target_ops *self)
void target_preopen(int from_tty)
int(* to_use_agent)(struct target_ops *, int use) TARGET_DEFAULT_NORETURN(tcomplain())
void(* to_prepare_to_store)(struct target_ops *, struct regcache *) TARGET_DEFAULT_NORETURN(noprocess())
void(* to_store_registers)(struct target_ops *, struct regcache *, int) TARGET_DEFAULT_NORETURN(noprocess())
int(* to_has_registers)(struct target_ops *)
static int inf_child_can_use_agent(struct target_ops *self)
void error(const char *fmt,...)
char *(* to_fileio_readlink)(struct target_ops *, struct inferior *inf, const char *filename, int *target_errno)
mach_port_t mach_port_t name mach_port_t mach_port_t name error_t int int rusage_t pid_t pid
void(* to_terminal_info)(struct target_ops *, const char *, int) TARGET_DEFAULT_FUNC(default_terminal_info)
void(* to_post_startup_inferior)(struct target_ops *, ptid_t) TARGET_DEFAULT_IGNORE()
int(* to_can_use_agent)(struct target_ops *) TARGET_DEFAULT_RETURN(0)
const ULONGEST const LONGEST len