aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>1999-05-25 18:09:09 +0000
committerJason Molenda <jmolenda@apple.com>1999-05-25 18:09:09 +0000
commit392a587b0562bfd8561bc15ad2625a4f49f461f0 (patch)
tree933e0970b7845c901c7ea3e128fa9cb0dcf9fe14 /gdb/remote.c
parent751d21b5b946a4a451552fbac692b14abea3d816 (diff)
downloadgdb-392a587b0562bfd8561bc15ad2625a4f49f461f0.zip
gdb-392a587b0562bfd8561bc15ad2625a4f49f461f0.tar.gz
gdb-392a587b0562bfd8561bc15ad2625a4f49f461f0.tar.bz2
import gdb-1999-05-25 snapshot
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c37
1 files changed, 19 insertions, 18 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index 6ec108c..5bcff88 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -2347,31 +2347,32 @@ remote_read_bytes (memaddr, myaddr, len)
}
/* Read or write LEN bytes from inferior memory at MEMADDR,
- transferring to or from debugger address MYADDR. Write to inferior
- if SHOULD_WRITE is nonzero. Returns length of data written or
- read; 0 for error. */
+ transferring to or from debugger address BUFFER. Write to inferior if
+ SHOULD_WRITE is nonzero. Returns length of data written or read; 0
+ for error. */
+
+#ifndef REMOTE_TRANSLATE_XFER_ADDRESS
+#define REMOTE_TRANSLATE_XFER_ADDRESS(MEM_ADDR, MEM_LEN, TARG_ADDR, TARG_LEN) \
+ (*(TARG_ADDR) = (MEM_ADDR), *(TARG_LEN) = (MEM_LEN))
+#endif
/* ARGSUSED */
static int
-remote_xfer_memory (memaddr, myaddr, len, should_write, target)
- CORE_ADDR memaddr;
- char *myaddr;
- int len;
+remote_xfer_memory (mem_addr, buffer, mem_len, should_write, target)
+ CORE_ADDR mem_addr;
+ char *buffer;
+ int mem_len;
int should_write;
struct target_ops *target; /* ignored */
{
-#ifdef REMOTE_TRANSLATE_XFER_ADDRESS
- CORE_ADDR targaddr;
- int targlen;
- REMOTE_TRANSLATE_XFER_ADDRESS (memaddr, len, targaddr, targlen);
- if (targlen == 0)
+ CORE_ADDR targ_addr;
+ int targ_len;
+ REMOTE_TRANSLATE_XFER_ADDRESS (mem_addr, mem_len, &targ_addr, &targ_len);
+ if (targ_len <= 0)
return 0;
- memaddr = targaddr;
- len = targlen;
-#endif
- return dcache_xfer_memory (remote_dcache, memaddr, myaddr,
- len, should_write);
+ return dcache_xfer_memory (remote_dcache, targ_addr, buffer,
+ targ_len, should_write);
}
@@ -3384,7 +3385,7 @@ Specify the serial device it is connected to (e.g. /dev/ttya).";
remote_ops.to_load = generic_load;
remote_ops.to_mourn_inferior = remote_mourn;
remote_ops.to_thread_alive = remote_thread_alive;
- remote_ops.to_find_new_threads = remote_find_new_threads;
+ remote_ops.to_find_new_threads = (void*) remote_find_new_threads;
remote_ops.to_stop = remote_stop;
remote_ops.to_query = remote_query;
remote_ops.to_stratum = process_stratum;