diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2012-01-20 09:47:32 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2012-01-20 09:47:32 +0000 |
commit | b9e7b9c3de60f6aef716ac169d82418ea27d4331 (patch) | |
tree | d50dcabd991b1b7fa639b51eba142bd39db2f4b8 /gdb/target.h | |
parent | 7313baad7c73664bed62b87481cbb078d71e84f4 (diff) | |
download | gdb-b9e7b9c3de60f6aef716ac169d82418ea27d4331.zip gdb-b9e7b9c3de60f6aef716ac169d82418ea27d4331.tar.gz gdb-b9e7b9c3de60f6aef716ac169d82418ea27d4331.tar.bz2 |
ChangeLog:
* configure.ac [AC_CHECK_FUNCS]: Check for readlink.
* config.in, configure: Regenerate.
* target.h (struct target_ops): Add to_fileio_readlink.
(target_fileio_readlink): Add prototype.
* target.c (target_fileio_readlink): New function.
* inf-child.c: Conditionally include <sys/param.h>.
(inf_child_fileio_readlink): New function.
(inf_child_target): Install it.
* remote.c (PACKET_vFile_readlink): New enum value.
(remote_hostio_readlink): New function.
(init_remote_ops): Install it.
(_initialize_remote): Handle vFile:readlink packet type.
doc/ChangeLog:
* gdb.texinfo (Remote Configuration): Document
"set remote hostio-readlink-packet" command.
(General Query Packets): Document vFile:readlink packet.
gdbserver/ChangeLog:
* hostio.c (handle_readlink): New function.
(handle_vFile): Call it to handle "vFile:readlink" packets.
Diffstat (limited to 'gdb/target.h')
-rw-r--r-- | gdb/target.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/target.h b/gdb/target.h index 4bbf4de..e1deb5e 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -709,6 +709,11 @@ struct target_ops occurs (and set *TARGET_ERRNO). */ int (*to_fileio_unlink) (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); + /* Tracepoint-related operations. */ @@ -1546,6 +1551,11 @@ extern int target_fileio_close (int fd, int *target_errno); occurs (and set *TARGET_ERRNO). */ extern int target_fileio_unlink (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). */ +extern char *target_fileio_readlink (const char *filename, int *target_errno); + /* Read target file FILENAME. The return value will be -1 if the transfer fails or is not supported; 0 if the object is empty; or the length of the object otherwise. If a positive value is returned, a |