Multi-target support
[deliverable/binutils-gdb.git] / gdb / gdbserver / nto-low.c
index 011701aa8ce3eee91bbcef2853006de5e2e12ce5..b4dea479b9c3a01d8ec08cbe612cff5dd37121dd 100644 (file)
@@ -1,6 +1,6 @@
 /* QNX Neutrino specific low level interface, for the remote server
    for GDB.
-   Copyright (C) 2009-2019 Free Software Foundation, Inc.
+   Copyright (C) 2009-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -22,6 +22,7 @@
 #include "gdbthread.h"
 #include "nto-low.h"
 #include "hostio.h"
+#include "debug.h"
 
 #include <limits.h>
 #include <fcntl.h>
@@ -32,7 +33,6 @@
 #include <sys/neutrino.h>
 
 
-extern int using_threads;
 int using_threads = 1;
 
 const struct target_desc *nto_tdesc;
@@ -247,7 +247,7 @@ nto_xfer_memory (off_t memaddr, unsigned char *myaddr, int len,
   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;
 }
@@ -505,7 +505,7 @@ nto_resume (struct thread_resume *resume_info, size_t n)
 
   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.  
@@ -931,7 +931,7 @@ nto_sw_breakpoint_from_kind (int kind, int *size)
 }
 
 
-static struct target_ops nto_target_ops = {
+static process_stratum_target nto_target_ops = {
   nto_create_inferior,
   NULL,  /* post_create_inferior */
   nto_attach,
@@ -963,7 +963,6 @@ static struct target_ops nto_target_ops = {
   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 */
This page took 0.032246 seconds and 4 git commands to generate.