/* Native-dependent code for GNU/Linux x86 (i386 and x86-64).
- Copyright (C) 1999-2015 Free Software Foundation, Inc.
+ Copyright (C) 1999-2017 Free Software Foundation, Inc.
This file is part of GDB.
#include "nat/x86-linux-dregs.h"
#include "nat/linux-ptrace.h"
-/* Per-thread arch-specific data we want to keep. */
-
-struct arch_lwp_info
-{
- /* Non-zero if our copy differs from what's recorded in the thread. */
- int debug_registers_changed;
-};
-
-\f
-
/* linux_nat_new_fork hook. */
static void
#ifdef __x86_64__
switch (xcr0_features_bits)
{
- case X86_XSTATE_MPX_AVX512_MASK:
- case X86_XSTATE_AVX512_MASK:
+ case X86_XSTATE_AVX_MPX_AVX512_PKU_MASK:
+ if (is_x32)
+ /* No MPX, PKU on x32, fall back to AVX-AVX512. */
+ return tdesc_x32_avx_avx512_linux;
+ else
+ return tdesc_amd64_avx_mpx_avx512_pku_linux;
+ case X86_XSTATE_AVX_AVX512_MASK:
if (is_x32)
- return tdesc_x32_avx512_linux;
+ return tdesc_x32_avx_avx512_linux;
else
- return tdesc_amd64_avx512_linux;
+ return tdesc_amd64_avx_avx512_linux;
case X86_XSTATE_MPX_MASK:
if (is_x32)
return tdesc_x32_avx_linux; /* No MPX on x32 using AVX. */
else
return tdesc_amd64_mpx_linux;
+ case X86_XSTATE_AVX_MPX_MASK:
+ if (is_x32)
+ return tdesc_x32_avx_linux; /* No MPX on x32 using AVX. */
+ else
+ return tdesc_amd64_avx_mpx_linux;
case X86_XSTATE_AVX_MASK:
if (is_x32)
return tdesc_x32_avx_linux;
{
switch (xcr0_features_bits)
{
- case X86_XSTATE_MPX_AVX512_MASK:
- case X86_XSTATE_AVX512_MASK:
- return tdesc_i386_avx512_linux;
+ case X86_XSTATE_AVX_MPX_AVX512_PKU_MASK:
+ return tdesc_i386_avx_mpx_avx512_pku_linux;
+ case X86_XSTATE_AVX_AVX512_MASK:
+ return tdesc_i386_avx_avx512_linux;
case X86_XSTATE_MPX_MASK:
return tdesc_i386_mpx_linux;
+ case X86_XSTATE_AVX_MPX_MASK:
+ return tdesc_i386_avx_mpx_linux;
case X86_XSTATE_AVX_MASK:
return tdesc_i386_avx_linux;
default:
const struct btrace_config *conf)
{
struct btrace_target_info *tinfo;
- struct gdbarch *gdbarch;
errno = 0;
tinfo = linux_enable_btrace (ptid, conf);
error (_("Could not enable branch tracing for %s: %s."),
target_pid_to_str (ptid), safe_strerror (errno));
- /* Fill in the size of a pointer in bits. */
- if (tinfo->ptr_bits == 0)
- {
- gdbarch = target_thread_architecture (ptid);
- tinfo->ptr_bits = gdbarch_ptr_bit (gdbarch);
- }
return tinfo;
}