Add target_ops argument to to_fileio_pwrite
authorTom Tromey <tromey@redhat.com>
Wed, 18 Dec 2013 04:38:34 +0000 (21:38 -0700)
committerTom Tromey <tromey@redhat.com>
Wed, 19 Feb 2014 14:46:11 +0000 (07:46 -0700)
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.

gdb/ChangeLog
gdb/inf-child.c
gdb/remote.c
gdb/target.c
gdb/target.h

index fcbaa36eeedece73542bc98874a889e51cd6e52b..c041549d53bf4179eb3001f43c7570089d71dd3d 100644 (file)
@@ -1,3 +1,11 @@
+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.
index cd2aee64ab6539097e67a44feb25336c21feb39e..6486b2c77f8ef582f05df6c18d53bef7c96e51d6 100644 (file)
@@ -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;
index a01ca463ded51754754a75e8d717e9e175a852f0..ae8c5236085eff03eb3625b07be07f3ee83b2ac7 100644 (file)
@@ -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)
index fbec3b92259677ed601c54845f9f2f9e17197208..ace183387bc333a606b97b53369ff68f380629d1 100644 (file)
@@ -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)
index 68b3aeebe4b12b9a22b8122d97647b4a5d580deb..02b66d7ee671348444c285cddb5707b8987fcb4b 100644 (file)
@@ -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.
This page took 0.037419 seconds and 4 git commands to generate.