2735833d5f
This patch allows examination of the registers FS_BASE and GS_BASE for Linux Systems running on 64bit. Tests for simple read and write of the new registers is also added with this patch. 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com> Richard Henderson <rth@redhat.com> gdb/ChangeLog: * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define. (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE GS_BASE for older kernels. (amd64_linux_store_inferior_registers): Add case to store FS_BASE GS_BASE for older kernels. * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE and GS_BASE to the offset table. (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the system register group. * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case for older kernels. * amd64-tdep.c (amd64_init_abi): Add segment registers for the amd64 ABI. * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and AMD64_GSBASE_REGNUM. (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1. * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat) (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat) (x32-avx-linux.dat, x32-avx512-linux.dat): Add i386/64bit-segments.xml in those rules. * features/i386/64bit-segments.xml: New file. * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml. * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml. * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml. * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml. * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml. * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml. * features/i386/amd64-linux.xml: Add 64bit-segments.xml. * features/i386/amd64-avx-linux.c: Regenerated. * features/i386/amd64-avx-mpx-linux.c: Regenerated. * features/i386/amd64-avx-mpx.c: Regenerated. * features/i386/amd64-avx512-linux.c: Regenerated. * features/i386/amd64-linux.c: Regenerated. * features/i386/amd64-mpx-linux.c: Regenerated. * features/i386/i386-avx-mpx-linux.c: Regenerated. * features/i386/i386-avx-mpx.c: Regenerated. * features/i386/x32-avx-linux.c: Regenerated. * features/i386/x32-avx512-linux.c: Regenerated. * regformats/i386/amd64-avx-linux.dat: Regenerated. * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated. * regformats/i386/amd64-avx512-linux.dat: Regenerated. * regformats/i386/amd64-linux.dat: Regenerated. * regformats/i386/amd64-mpx-linux.dat: Regenerated. * regformats/i386/x32-avx-linux.dat: Regenerated. * regformats/i386/x32-avx512-linux.dat: Regenerated. * regformats/i386/x32-linux.dat: Regenerated. gdb/doc/ChangeLog: * gdb.texinfo (i386 Features): Add system segment registers as feature. gdb/gdbserver/ChangeLog: * linux-x86-low.c (x86_64_regmap): Add fs_base and gs_base to the register table. (x86_fill_gregset): Add support for old kernels for the fs_base and gs_base system registers. (x86_store_gregset): Likewise. * configure.srv (srv_i386_64bit_xmlfiles): Add 64bit-segments.xml. gdb/testsuite/ChangeLog: * gdb.arch/amd64-gs_base.c: New file. * gdb.arch/amd64-gs_base.exp: New file. Change-Id: I2e0eeb93058a2320d4d3b045082643cfe4aff963 Signed-off-by: Walfred Tedeschi <walfred.tedeschi@intel.com>
66 lines
645 B
Plaintext
66 lines
645 B
Plaintext
# THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro:
|
|
# Generated from: i386/x32-linux.xml
|
|
name:x32_linux
|
|
xmltarget:x32-linux.xml
|
|
expedite:rbp,rsp,rip
|
|
64:rax
|
|
64:rbx
|
|
64:rcx
|
|
64:rdx
|
|
64:rsi
|
|
64:rdi
|
|
64:rbp
|
|
64:rsp
|
|
64:r8
|
|
64:r9
|
|
64:r10
|
|
64:r11
|
|
64:r12
|
|
64:r13
|
|
64:r14
|
|
64:r15
|
|
64:rip
|
|
32:eflags
|
|
32:cs
|
|
32:ss
|
|
32:ds
|
|
32:es
|
|
32:fs
|
|
32:gs
|
|
80:st0
|
|
80:st1
|
|
80:st2
|
|
80:st3
|
|
80:st4
|
|
80:st5
|
|
80:st6
|
|
80:st7
|
|
32:fctrl
|
|
32:fstat
|
|
32:ftag
|
|
32:fiseg
|
|
32:fioff
|
|
32:foseg
|
|
32:fooff
|
|
32:fop
|
|
128:xmm0
|
|
128:xmm1
|
|
128:xmm2
|
|
128:xmm3
|
|
128:xmm4
|
|
128:xmm5
|
|
128:xmm6
|
|
128:xmm7
|
|
128:xmm8
|
|
128:xmm9
|
|
128:xmm10
|
|
128:xmm11
|
|
128:xmm12
|
|
128:xmm13
|
|
128:xmm14
|
|
128:xmm15
|
|
32:mxcsr
|
|
64:orig_rax
|
|
64:fs_base
|
|
64:gs_base
|