X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fgdbserver%2Fnto-low.c;h=b4dea479b9c3a01d8ec08cbe612cff5dd37121dd;hb=f5df0b5f0874598790a60f1462f67887868bd77f;hp=05ab6fc4edf9d44b667cd1a896586bc4d8e99deb;hpb=ef2ddb33bd29a7c4f7027b9e37e55c74c15af825;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/gdbserver/nto-low.c b/gdb/gdbserver/nto-low.c index 05ab6fc4ed..b4dea479b9 100644 --- a/gdb/gdbserver/nto-low.c +++ b/gdb/gdbserver/nto-low.c @@ -1,6 +1,6 @@ /* 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. @@ -22,6 +22,7 @@ #include "gdbthread.h" #include "nto-low.h" #include "hostio.h" +#include "debug.h" #include #include @@ -32,7 +33,6 @@ #include -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; } @@ -397,8 +397,10 @@ nto_attach (unsigned long pid) /* 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 (); @@ -503,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. @@ -929,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, @@ -961,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 */