Imported Upstream version 7.9
[platform/upstream/gdb.git] / gdb / gdbserver / nto-low.c
index 3587156..589c32c 100644 (file)
@@ -1,6 +1,6 @@
 /* QNX Neutrino specific low level interface, for the remote server
    for GDB.
-   Copyright (C) 2009-2014 Free Software Foundation, Inc.
+   Copyright (C) 2009-2015 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -28,7 +28,6 @@
 #include <spawn.h>
 #include <sys/procfs.h>
 #include <sys/auxv.h>
-#include <stdarg.h>
 #include <sys/iomgr.h>
 #include <sys/neutrino.h>
 
@@ -623,12 +622,12 @@ nto_fetch_registers (struct regcache *regcache, int regno)
   if (regno >= the_low_target.num_regs)
     return;
 
-  if (current_inferior == NULL)
+  if (current_thread == NULL)
     {
-      TRACE ("current_inferior is NULL\n");
+      TRACE ("current_thread is NULL\n");
       return;
     }
-  ptid = thread_to_gdb_id (current_inferior);
+  ptid = thread_to_gdb_id (current_thread);
   if (!nto_set_thread (ptid))
     return;
 
@@ -670,12 +669,12 @@ nto_store_registers (struct regcache *regcache, int regno)
 
   TRACE ("%s (regno:%d)\n", __func__, regno);
 
-  if (current_inferior == NULL)
+  if (current_thread == NULL)
     {
-      TRACE ("current_inferior is NULL\n");
+      TRACE ("current_thread is NULL\n");
       return;
     }
-  ptid = thread_to_gdb_id (current_inferior);
+  ptid = thread_to_gdb_id (current_thread);
   if (!nto_set_thread (ptid))
     return;
 
@@ -862,11 +861,11 @@ nto_stopped_by_watchpoint (void)
   int ret = 0;
 
   TRACE ("%s\n", __func__);
-  if (nto_inferior.ctl_fd != -1 && current_inferior != NULL)
+  if (nto_inferior.ctl_fd != -1 && current_thread != NULL)
     {
       ptid_t ptid;
 
-      ptid = thread_to_gdb_id (current_inferior);
+      ptid = thread_to_gdb_id (current_thread);
       if (nto_set_thread (ptid))
        {
          const int watchmask = _DEBUG_FLAG_TRACE_RD | _DEBUG_FLAG_TRACE_WR
@@ -894,11 +893,11 @@ nto_stopped_data_address (void)
   CORE_ADDR ret = (CORE_ADDR)0;
 
   TRACE ("%s\n", __func__);
-  if (nto_inferior.ctl_fd != -1 && current_inferior != NULL)
+  if (nto_inferior.ctl_fd != -1 && current_thread != NULL)
     {
       ptid_t ptid;
 
-      ptid = thread_to_gdb_id (current_inferior);
+      ptid = thread_to_gdb_id (current_thread);
 
       if (nto_set_thread (ptid))
        {