Remove sanitized-out Magic Cap support, will never be released
[deliverable/binutils-gdb.git] / gdb / remote-st.c
index aa1b7cdee714073db373c3d23818cd3cd9507a5d..117501d83a31ae2aa22a93c96cdf3f7c2e31e14c 100644 (file)
@@ -16,7 +16,7 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 /* This file was derived from remote-eb.c, which did a similar job, but for
    an AMD-29K running EBMON.  That file was in turn derived from remote.c
@@ -38,9 +38,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "gdbcore.h"
 #include "target.h"
 #include "wait.h"
+#ifdef ANSI_PROTOTYPES
+#include <stdarg.h>
+#else
 #include <varargs.h>
+#endif
 #include <signal.h>
-#include <string.h>
+#include "gdb_string.h"
 #include <sys/types.h>
 #include "serial.h"
 
@@ -66,18 +70,27 @@ static serial_t st2000_desc;
 /* Send data to stdebug.  Works just like printf. */
 
 static void
+#ifdef ANSI_PROTOTYPES
+printf_stdebug(char *pattern, ...)
+#else
 printf_stdebug(va_alist)
      va_dcl
+#endif
 {
   va_list args;
-  char *pattern;
   char buf[200];
 
+#ifdef ANSI_PROTOTYPES
+  va_start(args, pattern);
+#else
+  char *pattern;
   va_start(args);
-
   pattern = va_arg(args, char *);
+#endif
 
   vsprintf(buf, pattern, args);
+  va_end(args);
+
   if (SERIAL_WRITE(st2000_desc, buf, strlen(buf)))
     fprintf(stderr, "SERIAL_WRITE failed: %s\n", safe_strerror(errno));
 }
@@ -251,10 +264,6 @@ st2000_create_inferior (execfile, args, env)
 
   entry_pt = (int) bfd_get_start_address (exec_bfd);
 
-#ifdef CREATE_INFERIOR_HOOK
-  CREATE_INFERIOR_HOOK (0);            /* No process-ID */
-#endif  
-
 /* The "process" (board) is already stopped awaiting our commands, and
    the program is already downloaded.  We just set its PC and go.  */
 
@@ -271,7 +280,8 @@ st2000_create_inferior (execfile, args, env)
   target_terminal_inferior ();
 
   /* insert_step_breakpoint ();  FIXME, do we need this?  */
-  proceed ((CORE_ADDR)entry_pt, -1, 0);                /* Let 'er rip... */
+  /* Let 'er rip... */
+  proceed ((CORE_ADDR)entry_pt, TARGET_SIGNAL_DEFAULT, 0);
 }
 
 /* Open a connection to a remote debugger.
@@ -359,7 +369,8 @@ st2000_detach (from_tty)
 
 static void
 st2000_resume (pid, step, sig)
-     int pid, step, sig;
+     int pid, step;
+     enum target_signal sig;
 {
   if (step)
     {
@@ -380,17 +391,19 @@ st2000_resume (pid, step, sig)
 
 static int
 st2000_wait (status)
-     WAITTYPE *status;
+     struct target_waitstatus *status;
 {
   int old_timeout = timeout;
 
-  WSETEXIT ((*status), 0);
+  status->kind = TARGET_WAITKIND_EXITED;
+  status->value.integer = 0;
 
   timeout = 0;         /* Don't time out -- user program is running. */
 
   expect_prompt(0);    /* Wait for prompt, outputting extraneous text */
 
-  WSETSTOP ((*status), SIGTRAP);
+  status->kind = TARGET_WAITKIND_STOPPED;
+  status->value.sig = TARGET_SIGNAL_TRAP;
 
   timeout = old_timeout;
 
@@ -809,6 +822,7 @@ the speed to connect at in bits per second.",
   st2000_mourn_inferior,
   0,                           /* can_run */
   0,                           /* notice_signals */
+  0,                           /* to_stop */
   process_stratum,
   0,                           /* next */
   1,
This page took 0.025091 seconds and 4 git commands to generate.