diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2007-04-27 13:22:18 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2007-04-27 13:22:18 +0000 |
commit | 2ac445f3c043386d91e566e16597403a5b72dfd6 (patch) | |
tree | 65abd9e98edf9298003ed18a302ad6bc43a8e6f0 /gdb/aix-thread.c | |
parent | 5d3f60158a067265158c4f756e6982f926d031e6 (diff) | |
download | gdb-2ac445f3c043386d91e566e16597403a5b72dfd6.tar.gz |
* aix-thread.c (aix_thread_xfer_memory): Replace by ...
(aix_thread_xfer_partial): ... this.
(init_aix_thread_ops): Install to_xfer_partial instead
of deprecated_xfer_memory target method.
* config/powerpc/aix.mh (NATDEPFILES): Remove infptrace.o
and inftarg.o, add inf-ptrace.o.
* config/rs6000/nm-rs6000.h (FETCH_INFERIOR_REGISTERS,
CHILD_XFER_MEMORY, KERNEL_U_SIZE, kernel_u_size): Remove.
* rs6000-nat.c: Include "inf-ptrace.h" and "gdb_stdint.h".
(fetch_inferior_registers): Rename to ...
(rs6000_fetch_inferior_registers): ... this. Make static.
(store_inferior_registers): Rename to ...
(rs6000_store_inferior_registers): ... this. Make static.
(read_word, child_xfer_memory): Remove.
(rs6000_xfer_partial): New function.
(kernel_u_size): Remove.
(_initialize_core_rs6000): Add inf_ptrace-based target.
* Makefile.in (rs6000-nat.o): Update dependencies.
Diffstat (limited to 'gdb/aix-thread.c')
-rw-r--r-- | gdb/aix-thread.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c index 481c1fefc69..f69e8df3502 100644 --- a/gdb/aix-thread.c +++ b/gdb/aix-thread.c @@ -1615,23 +1615,24 @@ aix_thread_store_registers (int regno) } } -/* Transfer LEN bytes of memory from GDB address MYADDR to target - address MEMADDR if WRITE and vice versa otherwise. */ - -static int -aix_thread_xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len, int write, - struct mem_attrib *attrib, - struct target_ops *target) +/* Attempt a transfer all LEN bytes starting at OFFSET between the + inferior's OBJECT:ANNEX space and GDB's READBUF/WRITEBUF buffer. + Return the number of bytes actually transferred. */ + +static LONGEST +aix_thread_xfer_partial (struct target_ops *ops, enum target_object object, + const char *annex, gdb_byte *readbuf, + const gdb_byte *writebuf, ULONGEST offset, LONGEST len) { - int n; - struct cleanup *cleanup = save_inferior_ptid (); + struct cleanup *old_chain = save_inferior_ptid (); + LONGEST xfer; inferior_ptid = pid_to_ptid (PIDGET (inferior_ptid)); - n = base_target.deprecated_xfer_memory (memaddr, myaddr, len, - write, attrib, &base_target); - do_cleanups (cleanup); + xfer = base_target.to_xfer_partial (ops, object, annex, + readbuf, writebuf, offset, len); - return n; + do_cleanups (old_chain); + return xfer; } /* Kill and forget about the inferior process. */ @@ -1763,7 +1764,7 @@ init_aix_thread_ops (void) aix_thread_ops.to_wait = aix_thread_wait; aix_thread_ops.to_fetch_registers = aix_thread_fetch_registers; aix_thread_ops.to_store_registers = aix_thread_store_registers; - aix_thread_ops.deprecated_xfer_memory = aix_thread_xfer_memory; + aix_thread_ops.to_xfer_partial = aix_thread_xfer_partial; /* No need for aix_thread_ops.to_create_inferior, because we activate thread debugging when the inferior reaches pd_brk_addr. */ aix_thread_ops.to_kill = aix_thread_kill; |