/* Low level interface to SPUs, for the remote server for GDB.
- Copyright (C) 2006-2018 Free Software Foundation, Inc.
+ Copyright (C) 2006-2019 Free Software Foundation, Inc.
Contributed by Ulrich Weigand <uweigand@de.ibm.com>.
#include "server.h"
-#include "gdb_wait.h"
+#include "common/gdb_wait.h"
#include <sys/ptrace.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/syscall.h>
-#include "filestuff.h"
+#include "common/filestuff.h"
#include "hostio.h"
#include "nat/fork-inferior.h"
/* Kill the inferior process. */
static int
-spu_kill (int pid)
+spu_kill (process_info *process)
{
int status, ret;
- struct process_info *process = find_process_pid (pid);
- if (process == NULL)
- return -1;
+ int pid = process->pid;
ptrace (PTRACE_KILL, pid, 0, 0);
/* Detach from inferior process. */
static int
-spu_detach (int pid)
+spu_detach (process_info *process)
{
- struct process_info *process = find_process_pid (pid);
- if (process == NULL)
- return -1;
-
- ptrace (PTRACE_DETACH, pid, 0, 0);
+ ptrace (PTRACE_DETACH, process->pid, 0, 0);
clear_inferiors ();
remove_process (process);