binutils-gdb/gdb/testsuite/gdb.arch
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
..
aarch64-atomic-inst.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
aarch64-atomic-inst.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
aarch64-fp.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
aarch64-fp.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
alpha-step.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
alpha-step.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
altivec-abi.c
altivec-abi.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
altivec-regs.c
altivec-regs.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-byte.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-disp-step.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-disp-step.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-dword.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-entry-value-inline.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-entry-value-inline.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-entry-value-inline.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-entry-value-param.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-entry-value-param.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-entry-value-param.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-entry-value-paramref.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-entry-value-paramref.cc update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-entry-value-paramref.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-entry-value.cc update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-entry-value.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-entry-value.s update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-gs_base.c amd64-linux: expose system register FS_BASE and GS_BASE for Linux. 2017-01-27 15:20:14 +01:00
amd64-gs_base.exp amd64-linux: expose system register FS_BASE and GS_BASE for Linux. 2017-01-27 15:20:14 +01:00
amd64-i386-address.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-i386-address.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-invalid-stack-middle.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-invalid-stack-middle.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-invalid-stack-middle.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-invalid-stack-top.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-invalid-stack-top.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-optimout-repeat.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-optimout-repeat.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-optimout-repeat.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-prologue-skip.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-prologue-skip.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-prologue-xmm.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-prologue-xmm.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-prologue-xmm.s update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-pseudo.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-stap-optional-prefix.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-stap-optional-prefix.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-stap-special-operands.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-stap-three-arg-disp.S
amd64-stap-three-arg-disp.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-stap-triplet.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-stap-triplet.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-stap-wrong-subexp.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-stap-wrong-subexp.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-tailcall-cxx.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-tailcall-cxx1.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-tailcall-cxx1.cc update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-tailcall-cxx2.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-tailcall-cxx2.cc update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-tailcall-noret.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-tailcall-noret.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-tailcall-noret.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-tailcall-ret.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-tailcall-ret.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-tailcall-ret.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-tailcall-self.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-tailcall-self.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-tailcall-self.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
amd64-word.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
arm-bl-branch-dest.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
arm-bl-branch-dest.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
arm-disp-step.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
arm-disp-step.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
arm-neon.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
arm-neon.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
arm-single-step-kernel-helper.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
arm-single-step-kernel-helper.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
avr-flash-qualifier.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
avr-flash-qualifier.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
cordic.ko.bz2
cordic.ko.debug.bz2
disp-step-insn-reloc.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
e500-abi.c
e500-abi.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
e500-prologue.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
e500-prologue.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
e500-regs.c
e500-regs.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
ftrace-insn-reloc.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
gdb1291.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
gdb1291.s update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
gdb1431.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
gdb1431.s update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
gdb1558.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
gdb1558.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-avx.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-avx.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-avx512.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-avx512.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-biarch-core.core.bz2
i386-biarch-core.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-bp_permanent.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-bp_permanent.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-byte.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-cfi-notcurrent.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-cfi-notcurrent.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-disp-step.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-disp-step.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-dr3-watch.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-dr3-watch.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-float.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-float.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-gnu-cfi-asm.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-gnu-cfi.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-gnu-cfi.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-mpx-map.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-mpx-map.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-mpx-sigsegv.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-mpx-sigsegv.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-mpx-simple_segv.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-mpx-simple_segv.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-mpx.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-mpx.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-permbkpt.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-permbkpt.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-prologue.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-prologue.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-pseudo.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-signal.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-signal.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-size-overlap.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-size-overlap.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-size.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-size.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-sse-stack-align.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-sse-stack-align.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-sse-stack-align.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-sse.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-sse.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-stap-eval-lang-ada.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-stap-eval-lang-ada.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-stap-eval-lang-ada.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-unwind.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-unwind.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
i386-word.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
ia64-breakpoint-shadow.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
ia64-breakpoint-shadow.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
insn-reloc.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
iwmmxt-regs.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
iwmmxt-regs.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
mips-fcr.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
mips-fcr.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
mips-octeon-bbit.c
mips-octeon-bbit.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
mips16-thunks-inmain.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
mips16-thunks-main.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
mips16-thunks-sin.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
mips16-thunks-sinfrob.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
mips16-thunks-sinfrob16.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
mips16-thunks-sinmain.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
mips16-thunks-sinmips16.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
mips16-thunks.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
pa-nullify.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
pa-nullify.s
pa64-nullify.s
powerpc-aix-prologue.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
powerpc-aix-prologue.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
powerpc-d128-regs.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
powerpc-d128-regs.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
powerpc-power.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
powerpc-power.s update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
powerpc-prologue.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
powerpc-prologue.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
powerpc-stackless.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
powerpc-stackless.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
ppc-dfp.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
ppc-dfp.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
ppc-fp.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
ppc-fp.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
ppc64-atomic-inst.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
ppc64-atomic-inst.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
ppc64-symtab-cordic.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
s390-multiarch.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
s390-multiarch.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
s390-stackless.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
s390-stackless.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
s390-tdbregs.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
s390-tdbregs.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
s390-vregs.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
s390-vregs.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
sparc-sysstep.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
sparc-sysstep.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
spu-info.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
spu-info.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
spu-ls.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
spu-ls.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
thumb-bx-pc.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
thumb-bx-pc.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
thumb-prologue.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
thumb-prologue.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
thumb-singlestep.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
thumb-singlestep.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
thumb2-it.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
thumb2-it.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
vsx-regs.c
vsx-regs.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00