aboutsummaryrefslogtreecommitdiff
path: root/gdb/aix-thread.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-04-27 13:22:18 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-04-27 13:22:18 +0000
commit037a727e3d7574f797adebad86e3eb8e37899be4 (patch)
tree126308446ff1b8301b8bf16387c2279a261e8bb7 /gdb/aix-thread.c
parentf7dd0ed7deb69614c40719a0c37985b3ec26503b (diff)
downloadgdb-037a727e3d7574f797adebad86e3eb8e37899be4.zip
gdb-037a727e3d7574f797adebad86e3eb8e37899be4.tar.gz
gdb-037a727e3d7574f797adebad86e3eb8e37899be4.tar.bz2
* 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.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c
index 481c1fe..f69e8df 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;