Fix for PR gdb/209, PR gdb/156:
[deliverable/binutils-gdb.git] / gdb / remote-eb.c
index c5c33a7c4e869a4d6f98e07cf975fcf388e6e15e..fa003c643261c7da9b5a6a70d63967a6aa89107f 100644 (file)
@@ -1,5 +1,6 @@
 /* Remote debugging interface for AMD 29000 EBMON on IBM PC, for GDB.
-   Copyright 1990, 1991, 1992 Free Software Foundation, Inc.
+   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001
+   Free Software Foundation, Inc.
    Contributed by Cygnus Support.  Written by Jim Kingdon for Cygnus.
 
    This file is part of GDB.
 
 #include "defs.h"
 #include "gdb_string.h"
+#include "regcache.h"
 
 #include "inferior.h"
 #include "bfd.h"
 #include "symfile.h"
-#include "gdb_wait.h"
 #include "value.h"
 #include <ctype.h>
 #include <fcntl.h>
@@ -100,7 +101,7 @@ expect (char *string)
 {
   char *p = string;
 
-  immediate_quit = 1;
+  immediate_quit++;
   while (1)
     {
       if (readchar () == *p)
@@ -108,7 +109,7 @@ expect (char *string)
          p++;
          if (*p == '\0')
            {
-             immediate_quit = 0;
+             immediate_quit--;
              return;
            }
        }
@@ -201,10 +202,6 @@ get_hex_regs (int n, int regno)
 /* Called when SIGALRM signal sent due to alarm() timeout.  */
 #ifndef HAVE_TERMIO
 
-#ifndef __STDC__
-#define volatile
-/**/
-#endif
 volatile int n_alarms;
 
 void
@@ -426,7 +423,7 @@ the baud rate, and the name of the program to run on the remote system.");
     /*EMPTY */ ;
 
   if (prog_name != NULL)
-    free (prog_name);
+    xfree (prog_name);
   prog_name = savestring (p, strlen (p));
 
   eb_close (0);
@@ -523,7 +520,7 @@ eb_detach (int from_tty)
 /* Tell the remote machine to resume.  */
 
 void
-eb_resume (int pid, int step, enum target_signal sig)
+eb_resume (ptid_t ptid, int step, enum target_signal sig)
 {
   if (step)
     {
@@ -562,8 +559,8 @@ eb_resume (int pid, int step, enum target_signal sig)
 /* Wait until the remote machine stops, then return,
    storing status in STATUS just as `wait' would.  */
 
-int
-eb_wait (struct target_waitstatus *status)
+ptid_t
+eb_wait (ptid_t ptid, struct target_waitstatus *status)
 {
   /* Strings to look for.  '?' means match any single character.  
      Note that with the algorithm we use, the initial character
@@ -871,15 +868,16 @@ eb_prepare_to_store (void)
   /* Do nothing, since we can store individual regs */
 }
 
+/* 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. */
 
-/* FIXME-someday!  Merge these two.  */
 int
-eb_xfer_inferior_memory (memaddr, myaddr, len, write, target)
-     CORE_ADDR memaddr;
-     char *myaddr;
-     int len;
-     int write;
-     struct target_ops *target;        /* ignored */
+eb_xfer_inferior_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 eb_write_inferior_memory (memaddr, myaddr, len);
@@ -1070,7 +1068,6 @@ target amd-eb /dev/ttya 9600 demo",
   eb_ops.to_thread_alive = 0;  /* thread-alive */
   eb_ops.to_stop = 0;          /* to_stop */
   eb_ops.to_pid_to_exec_file = NULL;
-  eb_ops.to_core_file_to_sym_file = NULL;
   eb_ops.to_stratum = process_stratum;
   eb_ops.DONT_USE = 0;         /* next */
   eb_ops.to_has_all_memory = 1;
This page took 0.025064 seconds and 4 git commands to generate.