Add target_ops argument to to_fileio_pwrite

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.
This commit is contained in:
Tom Tromey 2013-12-17 21:38:34 -07:00
parent cd89758676
commit 0d866f62e8
5 changed files with 17 additions and 5 deletions

View 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.

View 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;

View 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)

View 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)

View 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.