OSDN Git Service

* exec.c (xfer_memory): Add attrib argument.
[pf3gnuchains/pf3gnuchains4x.git] / gdb / remote-sds.c
index 1549978..56e61b6 100644 (file)
@@ -1,5 +1,5 @@
 /* Remote target communications for serial-line targets using SDS' protocol.
-   Copyright 1997 Free Software Foundation, Inc.
+   Copyright 1997, 2001 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -37,7 +37,6 @@
 #include "gdb-stabs.h"
 #include "gdbthread.h"
 #include "gdbcore.h"
-#include "dcache.h"
 
 #ifdef USG
 #include <sys/types.h>
@@ -56,7 +55,8 @@ static int sds_read_bytes (CORE_ADDR, char *, int);
 
 static void sds_files_info (struct target_ops *ignore);
 
-static int sds_xfer_memory (CORE_ADDR, char *, int, int, struct target_ops *);
+static int sds_xfer_memory (CORE_ADDR, char *, int, int, 
+                           struct mem_attrib *, struct target_ops *);
 
 static void sds_prepare_to_store (void);
 
@@ -190,8 +190,6 @@ sds_start_remote (PTR dummy)
 /* Open a connection to a remote debugger.
    NAME is the filename used for communication.  */
 
-static DCACHE *sds_dcache;
-
 static void
 sds_open (char *name, int from_tty)
 {
@@ -203,11 +201,6 @@ device is attached to the remote system (e.g. /dev/ttya).");
 
   unpush_target (&sds_ops);
 
-  if (!sds_dcache)
-    sds_dcache = dcache_init (sds_read_bytes, sds_write_bytes);
-  else
-    dcache_invd (sds_dcache);
-
   sds_desc = SERIAL_OPEN (name);
   if (!sds_desc)
     perror_with_name (name);
@@ -358,8 +351,6 @@ sds_resume (int pid, int step, enum target_signal siggnal)
 {
   unsigned char buf[PBUFSIZ];
 
-  dcache_invd (sds_dcache);
-
   last_sent_signal = siggnal;
   last_sent_step = step;
 
@@ -667,9 +658,17 @@ sds_read_bytes (CORE_ADDR memaddr, char *myaddr, int len)
 /* ARGSUSED */
 static int
 sds_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int should_write,
-                struct target_ops *target)
+                struct mem_attrib *attrib ATTRIBUTE_UNUSED,
+                struct target_ops *target ATTRIBUTE_UNUSED)
 {
-  return dcache_xfer_memory (sds_dcache, memaddr, myaddr, len, should_write);
+  int res;
+
+  if (should_write)
+    res = sds_write_bytes (memaddr, myaddr, len);
+  else
+    res = sds_read_bytes (memaddr, myaddr, len);
+  
+  return res;
 }
 \f