/* QNX Neutrino specific low level interface, for the remote server
for GDB.
- Copyright (C) 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2009-2020 Free Software Foundation, Inc.
This file is part of GDB.
#include "gdbthread.h"
#include "nto-low.h"
#include "hostio.h"
+#include "debug.h"
#include <limits.h>
#include <fcntl.h>
#include <sys/neutrino.h>
-extern int using_threads;
int using_threads = 1;
const struct target_desc *nto_tdesc;
if (nbytes == 0)
{
int e = errno;
- TRACE ("Error in %s : errno=%d (%s)\n", __func__, e, strerror (e));
+ TRACE ("Error in %s : errno=%d (%s)\n", __func__, e, safe_strerror (e));
}
return nbytes;
}
/* Send signal to process PID. */
static int
-nto_kill (int pid)
+nto_kill (process_info *proc)
{
+ int pid = proc->pid;
+
TRACE ("%s %d\n", __func__, pid);
kill (pid, SIGKILL);
do_detach ();
/* Detach from process PID. */
static int
-nto_detach (int pid)
+nto_detach (process_info *proc)
{
- TRACE ("%s %d\n", __func__, pid);
+ TRACE ("%s %d\n", __func__, proc->pid);
do_detach ();
return 0;
}
err = devctl (nto_inferior.ctl_fd, DCMD_PROC_RUN, &run, sizeof (run), 0);
if (err != EOK)
- TRACE ("Error: %d \"%s\"\n", err, strerror (err));
+ TRACE ("Error: %d \"%s\"\n", err, safe_strerror (err));
}
/* Wait for inferior's event.
}
-static struct target_ops nto_target_ops = {
+static process_stratum_target nto_target_ops = {
nto_create_inferior,
NULL, /* post_create_inferior */
nto_attach,
nto_stopped_data_address,
NULL, /* nto_read_offsets */
NULL, /* thread_db_set_tls_address */
- NULL,
hostio_last_error_from_errno,
NULL, /* nto_qxfer_osdata */
NULL, /* xfer_siginfo */