aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-12-17 21:39:24 -0700
committerTom Tromey <tromey@redhat.com>2014-02-19 07:46:14 -0700
commitfab5aa7c3fe5e60c877469a1e4c9c551e343409e (patch)
treec08e04150822930a416261f08e31dfb199c27cff /gdb
parentdbbca37d38772f0f75296b01b757225278eb51fc (diff)
downloadgdb-fab5aa7c3fe5e60c877469a1e4c9c551e343409e.zip
gdb-fab5aa7c3fe5e60c877469a1e4c9c551e343409e.tar.gz
gdb-fab5aa7c3fe5e60c877469a1e4c9c551e343409e.tar.bz2
Add target_ops argument to to_fileio_readlink
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_fileio_readlink>: 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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/inf-child.c3
-rw-r--r--gdb/remote.c3
-rw-r--r--gdb/target.c2
-rw-r--r--gdb/target.h3
5 files changed, 14 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 24d3b34..a15a8f3 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
2014-02-19 Tom Tromey <tromey@redhat.com>
+ * target.h (struct target_ops) <to_fileio_readlink>: 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 <tromey@redhat.com>
+
* target.h (struct target_ops) <to_fileio_unlink>: Add argument.
* target.c (target_fileio_unlink): Add argument.
* remote.c (remote_hostio_unlink): Add 'self' argument.
diff --git a/gdb/inf-child.c b/gdb/inf-child.c
index eb7550a..054e279 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 cf8870e..866c5c0 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 2c4b6b6..a4c0419 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 5d5802e..626da3e 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. */