/* 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
#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"
#include "remote-utils.h"
#include "inferior.h"
#include "version.h"
+#include "regcache.h"
extern int baud_rate;
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 ();
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 ();
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;
* 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));
* 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);
* 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;
timeout = old_timeout;
- return 0;
+ return inferior_ptid;
}
/*
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);