Phase 1 of the ptid_t changes.
[deliverable/binutils-gdb.git] / gdb / remote-sds.c
index 224032715b8aa6cfcea32f2f301c528682ae320d..27bc2416aea53e0c2fd3a57deb6f1d6f9e380d38 100644 (file)
@@ -1,5 +1,5 @@
 /* Remote target communications for serial-line targets using SDS' protocol.
-   Copyright 1997, 2001 Free Software Foundation, Inc.
+   Copyright 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -36,6 +36,7 @@
 #include "gdb-stabs.h"
 #include "gdbthread.h"
 #include "gdbcore.h"
+#include "regcache.h"
 
 #ifdef USG
 #include <sys/types.h>
@@ -61,7 +62,7 @@ static void sds_prepare_to_store (void);
 
 static void sds_fetch_registers (int);
 
-static void sds_resume (int, int, enum target_signal);
+static void sds_resume (ptid_t, int, enum target_signal);
 
 static int sds_start_remote (PTR);
 
@@ -85,7 +86,7 @@ static int sds_send (unsigned char *, int);
 
 static int readchar (int);
 
-static int sds_wait (int, struct target_waitstatus *);
+static ptid_t sds_wait (ptid_t, struct target_waitstatus *);
 
 static void sds_kill (void);
 
@@ -346,7 +347,7 @@ static enum target_signal last_sent_signal = TARGET_SIGNAL_0;
 int last_sent_step;
 
 static void
-sds_resume (int pid, int step, enum target_signal siggnal)
+sds_resume (ptid_t ptid, int step, enum target_signal siggnal)
 {
   unsigned char buf[PBUFSIZ];
 
@@ -415,8 +416,8 @@ int kill_kludge;
    STATUS just as `wait' would.  Returns "pid" (though it's not clear
    what, if anything, that means in the case of this target).  */
 
-static int
-sds_wait (int pid, struct target_waitstatus *status)
+static ptid_t
+sds_wait (ptid_t ptid, struct target_waitstatus *status)
 {
   unsigned char buf[PBUFSIZ];
   int retlen;
@@ -432,7 +433,7 @@ sds_wait (int pid, struct target_waitstatus *status)
     {
       just_started = 0;
       status->kind = TARGET_WAITKIND_STOPPED;
-      return inferior_pid;
+      return inferior_ptid;
     }
 
   while (1)
@@ -456,7 +457,7 @@ sds_wait (int pid, struct target_waitstatus *status)
        }
     }
 got_status:
-  return inferior_pid;
+  return inferior_ptid;
 }
 
 static unsigned char sprs[16];
@@ -746,7 +747,7 @@ putmessage (unsigned char *buf, int len)
      and giving it a checksum.  */
 
   if (len > 170)               /* Prosanity check */
-    abort ();
+    internal_error (__FILE__, __LINE__, "failed internal consistency check");
 
   if (remote_debug)
     {
@@ -1000,7 +1001,7 @@ sds_mourn (void)
 static void
 sds_create_inferior (char *exec_file, char *args, char **env)
 {
-  inferior_pid = 42000;
+  inferior_ptid = pid_to_ptid (42000);
 
   /* Clean up from the last time we were running.  */
   clear_proceed_status ();
@@ -1014,7 +1015,7 @@ sds_load (char *filename, int from_tty)
 {
   generic_load (filename, from_tty);
 
-  inferior_pid = 0;
+  inferior_ptid = null_ptid;
 }
 \f
 /* The SDS monitor has commands for breakpoint insertion, although it
This page took 0.025769 seconds and 4 git commands to generate.