X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fi386-linux-nat.c;h=a41ee2108152f63ea9560f5a3f847766f06158f3;hb=b1b53fb3ef077bf4412da53f0057b9c0e9ed4f3e;hp=bb0f2c8cca5ef44aa82bd58994b500d79c3cc7ed;hpb=3116063bd617de56fbc3bad046a692b1fb363a9d;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c index bb0f2c8cca..a41ee21081 100644 --- a/gdb/i386-linux-nat.c +++ b/gdb/i386-linux-nat.c @@ -1,6 +1,6 @@ /* Native-dependent code for GNU/Linux i386. - Copyright (C) 1999-2014 Free Software Foundation, Inc. + Copyright (C) 1999-2016 Free Software Foundation, Inc. This file is part of GDB. @@ -22,18 +22,20 @@ #include "gdbcore.h" #include "regcache.h" #include "elf/common.h" -#include +#include "nat/gdb_ptrace.h" +#include #include "gregset.h" #include "gdb_proc_service.h" -#include "x86-linux-nat.h" #include "i386-linux-nat.h" #include "i387-tdep.h" #include "i386-tdep.h" #include "i386-linux-tdep.h" -#include "i386-xstate.h" +#include "x86-xstate.h" +#include "linux-nat.h" #include "x86-linux-nat.h" +#include "nat/linux-ptrace.h" /* The register sets used in GNU/Linux ELF core-dumps are identical to the register sets in `struct user' that is used for a.out @@ -322,10 +324,10 @@ store_fpregs (const struct regcache *regcache, int tid, int regno) static int fetch_xstateregs (struct regcache *regcache, int tid) { - char xstateregs[I386_XSTATE_MAX_SIZE]; + char xstateregs[X86_XSTATE_MAX_SIZE]; struct iovec iov; - if (!have_ptrace_getregset) + if (have_ptrace_getregset != TRIBOOL_TRUE) return 0; iov.iov_base = xstateregs; @@ -345,10 +347,10 @@ fetch_xstateregs (struct regcache *regcache, int tid) static int store_xstateregs (const struct regcache *regcache, int tid, int regno) { - char xstateregs[I386_XSTATE_MAX_SIZE]; + char xstateregs[X86_XSTATE_MAX_SIZE]; struct iovec iov; - if (!have_ptrace_getregset) + if (have_ptrace_getregset != TRIBOOL_TRUE) return 0; iov.iov_base = xstateregs; @@ -648,8 +650,7 @@ static void i386_linux_resume (struct target_ops *ops, ptid_t ptid, int step, enum gdb_signal signal) { - int pid = ptid_get_pid (ptid); - + int pid = ptid_get_lwp (ptid); int request; if (catch_syscall_enabled () > 0) @@ -659,7 +660,7 @@ i386_linux_resume (struct target_ops *ops, if (step) { - struct regcache *regcache = get_thread_regcache (pid_to_ptid (pid)); + struct regcache *regcache = get_thread_regcache (ptid); struct gdbarch *gdbarch = get_regcache_arch (regcache); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); ULONGEST pc;