mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-24 10:35:12 +08:00
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:
parent
cd89758676
commit
0d866f62e8
@ -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.
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user