Enable support for the AArch64 dot-prod instruction in the Cortex A55 and A75 cpus.
[deliverable/binutils-gdb.git] / gdb / i386-gnu-nat.c
index e14a181564fd819eafaa0408ee6bab42a97d620f..3bce88a20608c1c3575a03491112c389d8f71e99 100644 (file)
@@ -1,6 +1,6 @@
 /* Low level interface to i386 running the GNU Hurd.
 
-   Copyright (C) 1992-2016 Free Software Foundation, Inc.
+   Copyright (C) 1992-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+/* Mach/Hurd headers are not yet ready for C++ compilation.  */
+extern "C"
+{
+#include <mach.h>
+#include <mach_error.h>
+#include <mach/message.h>
+#include <mach/exception.h>
+}
+
 #include "defs.h"
 #include "x86-nat.h"
 #include "inferior.h"
 #include "floatformat.h"
 #include "regcache.h"
 
-#include <mach.h>
-#include <mach_error.h>
-#include <mach/message.h>
-#include <mach/exception.h>
-
 #include "i386-tdep.h"
 
 #include "gnu-nat.h"
@@ -58,7 +62,7 @@ fetch_fpregs (struct regcache *regcache, struct proc *thread)
 {
   mach_msg_type_number_t count = i386_FLOAT_STATE_COUNT;
   struct i386_float_state state;
-  error_t err;
+  kern_return_t err;
 
   err = thread_get_state (thread->port, i386_FLOAT_STATE,
                          (thread_state_t) &state, &count);
@@ -87,15 +91,15 @@ gnu_fetch_registers (struct target_ops *ops,
                     struct regcache *regcache, int regno)
 {
   struct proc *thread;
+  ptid_t ptid = regcache_get_ptid (regcache);
 
   /* Make sure we know about new threads.  */
   inf_update_procs (gnu_current_inf);
 
-  thread = inf_tid_to_thread (gnu_current_inf,
-                             ptid_get_lwp (inferior_ptid));
+  thread = inf_tid_to_thread (gnu_current_inf, ptid_get_lwp (ptid));
   if (!thread)
     error (_("Can't fetch registers from thread %s: No such thread"),
-          target_pid_to_str (inferior_ptid));
+          target_pid_to_str (ptid));
 
   if (regno < I386_NUM_GREGS || regno == -1)
     {
@@ -148,7 +152,7 @@ store_fpregs (const struct regcache *regcache, struct proc *thread, int regno)
 {
   mach_msg_type_number_t count = i386_FLOAT_STATE_COUNT;
   struct i386_float_state state;
-  error_t err;
+  kern_return_t err;
 
   err = thread_get_state (thread->port, i386_FLOAT_STATE,
                          (thread_state_t) &state, &count);
@@ -180,15 +184,15 @@ gnu_store_registers (struct target_ops *ops,
 {
   struct proc *thread;
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  ptid_t ptid = regcache_get_ptid (regcache);
 
   /* Make sure we know about new threads.  */
   inf_update_procs (gnu_current_inf);
 
-  thread = inf_tid_to_thread (gnu_current_inf,
-                             ptid_get_lwp (inferior_ptid));
+  thread = inf_tid_to_thread (gnu_current_inf, ptid_get_lwp (ptid));
   if (!thread)
     error (_("Couldn't store registers into thread %s: No such thread"),
-          target_pid_to_str (inferior_ptid));
+          target_pid_to_str (ptid));
 
   if (regno < I386_NUM_GREGS || regno == -1)
     {
@@ -279,7 +283,7 @@ static void
 i386_gnu_dr_get (struct i386_debug_state *regs, struct proc *thread)
 {
   mach_msg_type_number_t count = i386_DEBUG_STATE_COUNT;
-  error_t err;
+  kern_return_t err;
 
   err = thread_get_state (thread->port, i386_DEBUG_STATE,
                          (thread_state_t) regs, &count);
@@ -293,7 +297,7 @@ i386_gnu_dr_get (struct i386_debug_state *regs, struct proc *thread)
 static void
 i386_gnu_dr_set (const struct i386_debug_state *regs, struct proc *thread)
 {
-  error_t err;
+  kern_return_t err;
 
   err = thread_set_state (thread->port, i386_DEBUG_STATE,
                          (thread_state_t) regs, i386_DEBUG_STATE_COUNT);
@@ -307,7 +311,7 @@ i386_gnu_dr_set (const struct i386_debug_state *regs, struct proc *thread)
 static void
 i386_gnu_dr_set_control_one (struct proc *thread, void *arg)
 {
-  unsigned long *control = arg;
+  unsigned long *control = (unsigned long *) arg;
   struct i386_debug_state regs;
 
   i386_gnu_dr_get (&regs, thread);
@@ -337,7 +341,7 @@ struct reg_addr
 static void
 i386_gnu_dr_set_addr_one (struct proc *thread, void *arg)
 {
-  struct reg_addr *reg_addr = arg;
+  struct reg_addr *reg_addr = (struct reg_addr *) arg;
   struct i386_debug_state regs;
 
   i386_gnu_dr_get (&regs, thread);
This page took 0.028213 seconds and 4 git commands to generate.