Linux: sys/ptrace.h -> nat/gdb_ptrace.h everywhere
[deliverable/binutils-gdb.git] / gdb / amd64-linux-nat.c
index 6b8d43a6dda97eb297d6d04a171c9f2471cb6c18..397f6643c4fe9f219625643ded0fab36d8266a6d 100644 (file)
@@ -1,6 +1,6 @@
 /* Native-dependent code for GNU/Linux x86-64.
 
-   Copyright (C) 2001-2014 Free Software Foundation, Inc.
+   Copyright (C) 2001-2015 Free Software Foundation, Inc.
    Contributed by Jiri Smid, SuSE Labs.
 
    This file is part of GDB.
 
 #include "defs.h"
 #include "inferior.h"
-#include "gdbcore.h"
 #include "regcache.h"
-#include "regset.h"
-#include "linux-nat.h"
-#include "amd64-linux-tdep.h"
-#include "nat/linux-btrace.h"
-#include "btrace.h"
-
-#include "gdb_assert.h"
-#include <string.h>
 #include "elf/common.h"
 #include <sys/uio.h>
-#include <sys/ptrace.h>
-#include <sys/debugreg.h>
-#include <sys/syscall.h>
-#include <sys/procfs.h>
-#include <sys/user.h>
+#include "nat/gdb_ptrace.h"
 #include <asm/prctl.h>
-/* FIXME ezannoni-2003-07-09: we need <sys/reg.h> to be included after
-   <asm/ptrace.h> because the latter redefines FS and GS for no apparent
-   reason, and those definitions don't match the ones that libpthread_db
-   uses, which come from <sys/reg.h>.  */
-/* ezannoni-2003-07-09: I think this is fixed.  The extraneous defs have
-   been removed from ptrace.h in the kernel.  However, better safe than
-   sorry.  */
-#include <asm/ptrace.h>
 #include <sys/reg.h>
-#include "gdb_proc_service.h"
-
-/* Prototypes for supply_gregset etc.  */
 #include "gregset.h"
+#include "gdb_proc_service.h"
 
+#include "amd64-nat.h"
+#include "linux-nat.h"
 #include "amd64-tdep.h"
+#include "amd64-linux-tdep.h"
 #include "i386-linux-tdep.h"
-#include "amd64-nat.h"
-#include "i386-nat.h"
-#include "i386-xstate.h"
+#include "x86-xstate.h"
 
 #include "x86-linux-nat.h"
+#include "nat/linux-ptrace.h"
 
 /* Mapping between the general-purpose registers in GNU/Linux x86-64
    `struct user' format and GDB's register cache layout for GNU/Linux
@@ -171,9 +150,9 @@ amd64_linux_fetch_inferior_registers (struct target_ops *ops,
     {
       elf_fpregset_t fpregs;
 
-      if (have_ptrace_getregset)
+      if (have_ptrace_getregset == TRIBOOL_TRUE)
        {
-         char xstateregs[I386_XSTATE_MAX_SIZE];
+         char xstateregs[X86_XSTATE_MAX_SIZE];
          struct iovec iov;
 
          iov.iov_base = xstateregs;
@@ -230,9 +209,9 @@ amd64_linux_store_inferior_registers (struct target_ops *ops,
     {
       elf_fpregset_t fpregs;
 
-      if (have_ptrace_getregset)
+      if (have_ptrace_getregset == TRIBOOL_TRUE)
        {
-         char xstateregs[I386_XSTATE_MAX_SIZE];
+         char xstateregs[X86_XSTATE_MAX_SIZE];
          struct iovec iov;
 
          iov.iov_base = xstateregs;
This page took 0.025657 seconds and 4 git commands to generate.