binutils-gdb/gdb/features
Walfred Tedeschi 2735833d5f amd64-linux: expose system register FS_BASE and GS_BASE for Linux.
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>
2017-01-27 15:20:14 +01:00
..
arm update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386 amd64-linux: expose system register FS_BASE and GS_BASE for Linux. 2017-01-27 15:20:14 +01:00
rs6000 update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
aarch64-core.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
aarch64-fpu.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
aarch64.c
aarch64.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
arc-arcompact.c
arc-arcompact.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
arc-v2.c
arc-v2.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
btrace-conf.dtd update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
btrace.dtd update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
feature_to_c.sh update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
gdb-target.dtd update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
gdbserver-regs.xsl
library-list-aix.dtd update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
library-list-svr4.dtd update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
library-list.dtd update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
m68k-core.xml
Makefile amd64-linux: expose system register FS_BASE and GS_BASE for Linux. 2017-01-27 15:20:14 +01:00
microblaze-core.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
microblaze-stack-protect.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
microblaze-with-stack-protect.c
microblaze-with-stack-protect.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
microblaze.c
microblaze.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
mips64-cp0.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
mips64-cpu.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
mips64-dsp-linux.c
mips64-dsp-linux.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
mips64-dsp.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
mips64-fpu.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
mips64-linux.c
mips64-linux.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
mips-cp0.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
mips-cpu.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
mips-dsp-linux.c
mips-dsp-linux.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
mips-dsp.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
mips-fpu.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
mips-linux.c
mips-linux.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
nds32-core.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
nds32-fpu.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
nds32-system.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
nds32.c
nds32.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
nios2-cpu.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
nios2-linux.c
nios2-linux.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
nios2.c
nios2.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
number-regs.xsl
osdata.dtd update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
s390-acr.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
s390-core32.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
s390-core64.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
s390-fpr.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
s390-linux32.c
s390-linux32.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
s390-linux32v1.c
s390-linux32v1.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
s390-linux32v2.c
s390-linux32v2.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
s390-linux64.c
s390-linux64.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
s390-linux64v1.c
s390-linux64v1.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
s390-linux64v2.c
s390-linux64v2.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
s390-tdb.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
s390-te-linux64.c
s390-te-linux64.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
s390-tevx-linux64.c
s390-tevx-linux64.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
s390-vx-linux64.c
s390-vx-linux64.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
s390-vx.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
s390x-core64.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
s390x-linux64.c
s390x-linux64.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
s390x-linux64v1.c
s390x-linux64v1.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
s390x-linux64v2.c
s390x-linux64v2.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
s390x-te-linux64.c
s390x-te-linux64.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
s390x-tevx-linux64.c
s390x-tevx-linux64.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
s390x-vx-linux64.c
s390x-vx-linux64.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
sort-regs.xsl
threads.dtd update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
tic6x-c6xp.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
tic6x-c62x-linux.c
tic6x-c62x-linux.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
tic6x-c62x.c
tic6x-c62x.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
tic6x-c64x-linux.c
tic6x-c64x-linux.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
tic6x-c64x.c
tic6x-c64x.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
tic6x-c64xp-linux.c
tic6x-c64xp-linux.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
tic6x-c64xp.c
tic6x-c64xp.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
tic6x-core.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
tic6x-gp.xml update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
traceframe-info.dtd update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
xinclude.dtd update copyright year range in GDB files 2017-01-01 10:52:34 +04:00