aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/inf-child.c3
-rw-r--r--gdb/remote.c6
-rw-r--r--gdb/target.c2
-rw-r--r--gdb/target.h3
5 files changed, 17 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fcbaa36..c041549 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,13 @@
2014-02-19 Tom Tromey <tromey@redhat.com>
+ * target.h (struct target_ops) <to_fileio_pwrite>: Add argument.
+ * target.c (target_fileio_pwrite): Add argument.
+ * remote.c (remote_hostio_pwrite): Add 'self' argument.
+ (remote_file_put): Update.
+ * inf-child.c (inf_child_fileio_pwrite): Add 'self' argument.
+
+2014-02-19 Tom Tromey <tromey@redhat.com>
+
* target.h (struct target_ops) <to_fileio_open>: Add argument.
* target.c (target_fileio_open): Add argument.
* remote.c (remote_hostio_open): Add 'self' argument.
diff --git a/gdb/inf-child.c b/gdb/inf-child.c
index cd2aee6..6486b2c 100644
--- a/gdb/inf-child.c
+++ b/gdb/inf-child.c
@@ -257,7 +257,8 @@ inf_child_fileio_open (struct target_ops *self,
Return the number of bytes written, or -1 if an error occurs
(and set *TARGET_ERRNO). */
static int
-inf_child_fileio_pwrite (int fd, const gdb_byte *write_buf, int len,
+inf_child_fileio_pwrite (struct target_ops *self,
+ int fd, const gdb_byte *write_buf, int len,
ULONGEST offset, int *target_errno)
{
int ret;
diff --git a/gdb/remote.c b/gdb/remote.c
index a01ca46..ae8c523 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -9683,7 +9683,8 @@ remote_hostio_open (struct target_ops *self,
set *REMOTE_ERRNO). */
static int
-remote_hostio_pwrite (int fd, const gdb_byte *write_buf, int len,
+remote_hostio_pwrite (struct target_ops *self,
+ int fd, const gdb_byte *write_buf, int len,
ULONGEST offset, int *remote_errno)
{
struct remote_state *rs = get_remote_state ();
@@ -10054,7 +10055,8 @@ remote_file_put (const char *local_file, const char *remote_file, int from_tty)
bytes += bytes_in_buffer;
bytes_in_buffer = 0;
- retcode = remote_hostio_pwrite (fd, buffer, bytes,
+ retcode = remote_hostio_pwrite (find_target_at (process_stratum),
+ fd, buffer, bytes,
offset, &remote_errno);
if (retcode < 0)
diff --git a/gdb/target.c b/gdb/target.c
index fbec3b9..ace1833 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -3400,7 +3400,7 @@ target_fileio_pwrite (int fd, const gdb_byte *write_buf, int len,
{
if (t->to_fileio_pwrite != NULL)
{
- int ret = t->to_fileio_pwrite (fd, write_buf, len, offset,
+ int ret = t->to_fileio_pwrite (t, fd, write_buf, len, offset,
target_errno);
if (targetdebug)
diff --git a/gdb/target.h b/gdb/target.h
index 68b3aee..02b66d7 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -723,7 +723,8 @@ struct target_ops
/* 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). */
- int (*to_fileio_pwrite) (int fd, const gdb_byte *write_buf, int len,
+ int (*to_fileio_pwrite) (struct target_ops *,
+ int fd, const gdb_byte *write_buf, int len,
ULONGEST offset, int *target_errno);
/* Read up to LEN bytes FD on the target into READ_BUF.