/* 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.
#include "gdb-stabs.h"
#include "gdbthread.h"
#include "gdbcore.h"
+#include "regcache.h"
#ifdef USG
#include <sys/types.h>
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);
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);
static int
sds_start_remote (PTR dummy)
{
- char c;
+ int c;
unsigned char buf[200];
immediate_quit++; /* Allow user to interrupt it */
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];
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;
{
just_started = 0;
status->kind = TARGET_WAITKIND_STOPPED;
- return inferior_pid;
+ return inferior_ptid;
}
while (1)
}
}
got_status:
- return inferior_pid;
+ return inferior_ptid;
}
static unsigned char sprs[16];
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 ();
{
generic_load (filename, from_tty);
- inferior_pid = 0;
+ inferior_ptid = null_ptid;
}
\f
/* The SDS monitor has commands for breakpoint insertion, although it