summaryrefslogtreecommitdiff
path: root/gdb/target.h
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2012-01-20 09:47:32 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2012-01-20 09:47:32 +0000
commitb1805119882385f115008912122d043431aa2019 (patch)
tree56725195de8ca175248e673576f58f5b36278a6a /gdb/target.h
parente275619a2e8d64964b675b0e85bb7c69e2a7dad0 (diff)
downloadgdb-b1805119882385f115008912122d043431aa2019.tar.gz
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.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/target.h b/gdb/target.h
index 4bbf4de88d1..e1deb5ef33e 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