From fab5aa7c3fe5e60c877469a1e4c9c551e343409e Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 17 Dec 2013 21:39:24 -0700 Subject: [PATCH] Add target_ops argument to to_fileio_readlink 2014-02-19 Tom Tromey * target.h (struct target_ops) : Add argument. * target.c (target_fileio_readlink): Add argument. * remote.c (remote_hostio_readlink): Add 'self' argument. * inf-child.c (inf_child_fileio_readlink): Add 'self' argument. --- gdb/ChangeLog | 7 +++++++ gdb/inf-child.c | 3 ++- gdb/remote.c | 3 ++- gdb/target.c | 2 +- gdb/target.h | 3 ++- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 24d3b34dcf1..a15a8f3f7dd 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2014-02-19 Tom Tromey + + * target.h (struct target_ops) : Add argument. + * target.c (target_fileio_readlink): Add argument. + * remote.c (remote_hostio_readlink): Add 'self' argument. + * inf-child.c (inf_child_fileio_readlink): Add 'self' argument. + 2014-02-19 Tom Tromey * target.h (struct target_ops) : Add argument. diff --git a/gdb/inf-child.c b/gdb/inf-child.c index eb7550a9c65..054e2794717 100644 --- a/gdb/inf-child.c +++ b/gdb/inf-child.c @@ -344,7 +344,8 @@ inf_child_fileio_unlink (struct target_ops *self, null-terminated string allocated via xmalloc, or NULL if an error occurs (and set *TARGET_ERRNO). */ static char * -inf_child_fileio_readlink (const char *filename, int *target_errno) +inf_child_fileio_readlink (struct target_ops *self, + const char *filename, int *target_errno) { /* We support readlink only on systems that also provide a compile-time maximum path length (PATH_MAX), at least for now. */ diff --git a/gdb/remote.c b/gdb/remote.c index cf8870edbf9..866c5c00f96 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -9791,7 +9791,8 @@ remote_hostio_unlink (struct target_ops *self, occurs (and set *REMOTE_ERRNO). */ static char * -remote_hostio_readlink (const char *filename, int *remote_errno) +remote_hostio_readlink (struct target_ops *self, + const char *filename, int *remote_errno) { struct remote_state *rs = get_remote_state (); char *p = rs->buf; diff --git a/gdb/target.c b/gdb/target.c index 2c4b6b658c3..a4c04194e7c 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -3509,7 +3509,7 @@ target_fileio_readlink (const char *filename, int *target_errno) { if (t->to_fileio_readlink != NULL) { - char *ret = t->to_fileio_readlink (filename, target_errno); + char *ret = t->to_fileio_readlink (t, filename, target_errno); if (targetdebug) fprintf_unfiltered (gdb_stdlog, diff --git a/gdb/target.h b/gdb/target.h index 5d5802ef098..626da3e4a5d 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -746,7 +746,8 @@ struct target_ops /* 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. */ -- 2.30.2