* write.c (relax_segment <rs_space>): Calculate growth using
[deliverable/binutils-gdb.git] / gdb / remote-array.c
index 9c3a9d79cef5fc493c91b2f36bf976f589440d15..35d271d8f49c476b275260cbfbfe0270abfc40aa 100644 (file)
@@ -1,5 +1,6 @@
 /* Remote debugging interface for Array Tech RAID controller..
-   Copyright 90, 91, 92, 93, 94, 1995, 1998  Free Software Foundation, Inc.
+   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+   2000, 2001 Free Software Foundation, Inc.
    Contributed by Cygnus Support. Written by Rob Savoye for Cygnus.
 
    This module talks to a debug monitor called 'MONITOR', which
@@ -28,9 +29,7 @@
 #include "defs.h"
 #include "gdbcore.h"
 #include "target.h"
-#include "gdb_wait.h"
 #include <ctype.h>
-#include <signal.h>
 #include <sys/types.h>
 #include "gdb_string.h"
 #include "command.h"
@@ -39,6 +38,7 @@
 #include "remote-utils.h"
 #include "inferior.h"
 #include "version.h"
+#include "regcache.h"
 
 extern int baud_rate;
 
@@ -67,7 +67,7 @@ static void array_open ();
 static void array_close ();
 static void array_detach ();
 static void array_attach ();
-static void array_resume ();
+static void array_resume (ptid_t ptid, int step, enum target_signal sig);
 static void array_fetch_register ();
 static void array_store_register ();
 static void array_fetch_registers ();
@@ -79,7 +79,8 @@ static void array_create_inferior ();
 static void array_mourn_inferior ();
 static void make_gdb_packet ();
 static int array_xfer_memory ();
-static int array_wait ();
+static ptid_t array_wait (ptid_t ptid,
+                                 struct target_waitstatus *status);
 static int array_insert_breakpoint ();
 static int array_remove_breakpoint ();
 static int tohex ();
@@ -178,7 +179,6 @@ Specify the serial device it is connected to (e.g. /dev/ttya).";
   array_ops.to_thread_alive = 0;
   array_ops.to_stop = 0;
   array_ops.to_pid_to_exec_file = NULL;
-  array_ops.to_core_file_to_sym_file = NULL;
   array_ops.to_stratum = process_stratum;
   array_ops.DONT_USE = 0;
   array_ops.to_has_all_memory = 1;
@@ -216,9 +216,7 @@ printf_monitor (char *pattern,...)
  * write_monitor -- send raw data to monitor.
  */
 static void
-write_monitor (data, len)
-     char data[];
-     int len;
+write_monitor (char data[], int len)
 {
   if (SERIAL_WRITE (array_desc, data, len))
     fprintf (stderr, "SERIAL_WRITE failed: %s\n", safe_strerror (errno));
@@ -700,7 +698,7 @@ array_attach (char *args, int from_tty)
  * array_resume -- Tell the remote machine to resume.
  */
 static void
-array_resume (int pid, int step, enum target_signal sig)
+array_resume (ptid_t ptid, int step, enum target_signal sig)
 {
   debuglogs (1, "array_resume (step=%d, sig=%d)", step, sig);
 
@@ -720,8 +718,8 @@ array_resume (int pid, int step, enum target_signal sig)
  * array_wait -- Wait until the remote machine stops, then return,
  *          storing status in status just as `wait' would.
  */
-static int
-array_wait (int pid, struct target_waitstatus *status)
+static ptid_t
+array_wait (ptid_t ptid, struct target_waitstatus *status)
 {
   int old_timeout = timeout;
   int result, i;
@@ -787,7 +785,7 @@ array_wait (int pid, struct target_waitstatus *status)
 
   timeout = old_timeout;
 
-  return 0;
+  return inferior_ptid;
 }
 
 /*
@@ -1020,14 +1018,16 @@ array_read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
   return (count);
 }
 
-/* FIXME-someday!  merge these two.  */
+/* Transfer LEN bytes between GDB address MYADDR and target address
+   MEMADDR.  If WRITE is non-zero, transfer them to the target,
+   otherwise transfer them from the target.  TARGET is unused.
+
+   Returns the number of bytes transferred. */
+
 static int
-array_xfer_memory (memaddr, myaddr, len, write, target)
-     CORE_ADDR memaddr;
-     char *myaddr;
-     int len;
-     int write;
-     struct target_ops *target;        /* ignored */
+array_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
+                  struct mem_attrib *attrib ATTRIBUTE_UNUSED,
+                  struct target_ops *target ATTRIBUTE_UNUSED)
 {
   if (write)
     return array_write_inferior_memory (memaddr, myaddr, len);
This page took 0.026433 seconds and 4 git commands to generate.