diff options
Diffstat (limited to 'gdb/target.h')
-rw-r--r-- | gdb/target.h | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/gdb/target.h b/gdb/target.h index 7e52716..0b78427 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -81,6 +81,7 @@ struct inferior; #include "command.h" #include "disasm-flags.h" #include "tracepoint.h" +#include "gdbsupport/fileio.h" #include "gdbsupport/break-common.h" /* For enum target_hw_bp_type. */ @@ -952,28 +953,28 @@ struct target_ops *TARGET_ERRNO). */ virtual int fileio_open (struct inferior *inf, const char *filename, int flags, int mode, int warn_if_slow, - int *target_errno); + fileio_error *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). */ virtual int fileio_pwrite (int fd, const gdb_byte *write_buf, int len, - ULONGEST offset, int *target_errno); + ULONGEST offset, fileio_error *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). */ virtual int fileio_pread (int fd, gdb_byte *read_buf, int len, - ULONGEST offset, int *target_errno); + ULONGEST offset, fileio_error *target_errno); /* Get information about the file opened as FD and put it in SB. Return 0 on success, or -1 if an error occurs (and set *TARGET_ERRNO). */ - virtual int fileio_fstat (int fd, struct stat *sb, int *target_errno); + virtual int fileio_fstat (int fd, struct stat *sb, fileio_error *target_errno); /* Close FD on the target. Return 0, or -1 if an error occurs (and set *TARGET_ERRNO). */ - virtual int fileio_close (int fd, int *target_errno); + virtual int fileio_close (int fd, fileio_error *target_errno); /* Unlink FILENAME on the target, in the filesystem as seen by INF. If INF is NULL, use the filesystem seen by the debugger @@ -981,7 +982,7 @@ struct target_ops -1 if an error occurs (and set *TARGET_ERRNO). */ virtual int fileio_unlink (struct inferior *inf, const char *filename, - int *target_errno); + fileio_error *target_errno); /* Read value of symbolic link FILENAME on the target, in the filesystem as seen by INF. If INF is NULL, use the filesystem @@ -990,7 +991,7 @@ struct target_ops occurs (and set *TARGET_ERRNO). */ virtual gdb::optional<std::string> fileio_readlink (struct inferior *inf, const char *filename, - int *target_errno); + fileio_error *target_errno); /* Implement the "info proc" command. Returns true if the target actually implemented the command, false otherwise. */ @@ -2165,29 +2166,29 @@ extern bool target_filesystem_is_local (); extern int target_fileio_open (struct inferior *inf, const char *filename, int flags, int mode, bool warn_if_slow, - int *target_errno); + fileio_error *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). */ extern int target_fileio_pwrite (int fd, const gdb_byte *write_buf, int len, - ULONGEST offset, int *target_errno); + ULONGEST offset, fileio_error *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). */ extern int target_fileio_pread (int fd, gdb_byte *read_buf, int len, - ULONGEST offset, int *target_errno); + ULONGEST offset, fileio_error *target_errno); /* Get information about the file opened as FD on the target and put it in SB. Return 0 on success, or -1 if an error occurs (and set *TARGET_ERRNO). */ extern int target_fileio_fstat (int fd, struct stat *sb, - int *target_errno); + fileio_error *target_errno); /* Close FD on the target. Return 0, or -1 if an error occurs (and set *TARGET_ERRNO). */ -extern int target_fileio_close (int fd, int *target_errno); +extern int target_fileio_close (int fd, fileio_error *target_errno); /* Unlink FILENAME on the target, in the filesystem as seen by INF. If INF is NULL, use the filesystem seen by the debugger (GDB or, @@ -2195,7 +2196,7 @@ extern int target_fileio_close (int fd, int *target_errno); occurs (and set *TARGET_ERRNO). */ extern int target_fileio_unlink (struct inferior *inf, const char *filename, - int *target_errno); + fileio_error *target_errno); /* Read value of symbolic link FILENAME on the target, in the filesystem as seen by INF. If INF is NULL, use the filesystem seen @@ -2203,7 +2204,7 @@ extern int target_fileio_unlink (struct inferior *inf, Return a null-terminated string allocated via xmalloc, or NULL if an error occurs (and set *TARGET_ERRNO). */ extern gdb::optional<std::string> target_fileio_readlink - (struct inferior *inf, const char *filename, int *target_errno); + (struct inferior *inf, const char *filename, fileio_error *target_errno); /* Read target file FILENAME, in the filesystem as seen by INF. If INF is NULL, use the filesystem seen by the debugger (GDB or, for |