binutils-gdb/gdb/common
Walfred Tedeschi 1dbcd68cf1 Add MPX support for i386
2013-11-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>

	* i386-linux-nat.c (GETXSTATEREGS_SUPPLIES): Add MPX
	registers on the range of registers to be read from
	xsave buffer.
	(i386_linux_read_description): Add case for MPX.
	* i386-linux-tdep.c: Include features/i386/i386-mpx-linux.c.
	(i386_linux_gregset_reg_offset): Add MPX registers.
	(i386_linux_core_read_description): Initialize also MPX.
	(_initialize_i386_linux_tdep): Add mpx initialization.
	* i386-tdep.h (gdbarch_tdep): Add fields bnd0r_regnum, bnd0_regnum,
	mpx_register_names.
	(i386_regnum): Add MPX registers.
	(I386_MPX_NUM_REGS): New macro.
	(i386_bnd_regnum_p): New function.
	* i386-linux-tdep.h (I386_LINUX_NUM_REGS): Set
	number of registers to be the number of BNDSTATUS.
	(tdesc_i386_mpx_linux): Add description for MPX Linux registers.
	* i386-tdep.c: Include features/i386/i386-mpx.c.
	(i386_mpx_names): Add MPX register names array.
	(i386_bnd_names): Add bnd pseudo register names array.
	(i386_bndr_regnum_p): Lookup register numbers for bnd raw
	registers.
	(i386_bndr_regnum_p): Lookup register numbers for bnd raw registers.
	(386_mpx_ctrl_regnum_p): Lookup register numbers for MPX control
	registers.
	(i386_bnd_type): New function.
	(i386_pseudo_register_type): Use i386_bnd_type for bnd pseudo
	register types.
	(i386_pseudo_register_read_into_value): Add bnd case.
	(i386_pseudo_register_write): Add bnd pseudo registers.
	(i386_register_reggroup_p): Add MPX register to the group all.
	(i386_validate_tdesc_p): Add MPX to the target 	description
	validation.
	(i386_pseudo_register_name): Add bnd pseudo registers.
	(i386_gdbarch_init): Add MPX for architecture initialization.
	(_initia_initialize_i386_tdep): Add mpx initialization.
	* i387-tdep.c (xsave_mpx_offset): New vector for MPX offsets on
	XSAVE buffer.
	(XSAVE_MPX_ADDR): New macro.
	(i387_supply_xsave): Add MPX case.
	(i387_collect_xsave): Add MPX case.
	* i387-tdep.h (I387_BND0R_REGNUM): New macro.
	(I387_BNDCFGU_REGNUM): New macro.
	(I387_NUM_MPX_REGS): New macro.
	(I387_NUM_BND_REGS): New macro.
	(I387_NUM_MPX_CTRL_REGS): New macro.
	(I387_MPXEND_REGNUM): New macro.
	* common/i386-xstate.h (I386_XSTATE_BNDREGS): New macro.
	(I386_XSTATE_BNDCFG): Likewise.
	(I386_XSTATE_MPX_MASK): Likewise.
	(I386_XSTATE_ALL_MASK): New macro represents flags for all states.
	(I386_XSTATE_BNDREGS_SIZE): New macro.
	(I386_XSTATE_BNDCFG_SIZE): Likewise.
	(I386_XSTATE_SIZE): Adapt for MPX.
	(I386_XSTATE_MAX_SIZE): Likewise.

Change-Id: I9ddb7d49434d86fa18eb6b99515203d7c567aefd
Signed-off-by: Walfred Tedeschi <walfred.tedeschi@intel.com>

Conflicts:

	gdb/ChangeLog
2013-11-20 14:42:50 +01:00
..
agent.c PR gdb/7912: 2013-04-22 16:46:15 +00:00
agent.h
ax.def
break-common.h gdb/ 2013-07-27 07:11:46 +00:00
btrace-common.h
buffer.c
buffer.h
common-utils.c remove gdb_string.h 2013-11-18 13:29:00 -07:00
common-utils.h
common.m4 remove gdb_dirent.h 2013-11-18 13:29:01 -07:00
create-version.sh gdb/ 2013-07-04 01:22:38 +00:00
filestuff.c remove gdb_stat.h 2013-11-18 13:29:02 -07:00
filestuff.h 2013-05-10 Joel Brobecker <brobecker@adacore.com> 2013-05-10 17:01:00 +00:00
format.c Handle '#' flag for printf of pointer types. 2013-08-13 16:05:23 +00:00
format.h
gdb_assert.h
gdb_locale.h
gdb_signals.h infrun debug output: print enum gdb_signal symbol names instead of POSIX signal names. 2013-10-25 14:02:59 +00:00
gdb_thread_db.h Move fallback thread_db.h to a separate file. 2013-04-16 18:14:55 +00:00
gdb_vecs.c
gdb_vecs.h gdb/ 2013-06-26 08:01:57 +00:00
gdb_wait.h
glibc_thread_db.h Update glibc_thread_db.h from upstream. 2013-04-16 18:17:11 +00:00
host-defs.h
i386-cpuid.h gdb: clean up x86 cpuid implementations 2013-06-19 22:29:36 +00:00
i386-gcc-cpuid.h gdb: clean up x86 cpuid implementations 2013-06-19 22:29:36 +00:00
i386-xstate.h Add MPX support for i386 2013-11-20 14:42:50 +01:00
linux-btrace.c gdb: btrace: fix build errors on older glibc builds 2013-09-29 03:57:34 +00:00
linux-btrace.h
linux-osdata.c remove gdb_stat.h 2013-11-18 13:29:02 -07:00
linux-osdata.h
linux-procfs.c remove gdb_string.h 2013-11-18 13:29:00 -07:00
linux-procfs.h
linux-ptrace.c remove gdb_string.h 2013-11-18 13:29:00 -07:00
linux-ptrace.h Unify ptrace options discovery code and make both GDB and 2013-08-22 23:46:30 +00:00
mips-linux-watch.c gdb/ 2013-07-27 07:49:05 +00:00
mips-linux-watch.h gdb/ 2013-07-27 07:49:05 +00:00
ptid.c Clean up ptid.h/ptid.c. 2013-10-04 10:04:14 +00:00
ptid.h Clean up ptid.h/ptid.c. 2013-10-04 10:04:14 +00:00
queue.h
signals.c remove gdb_string.h 2013-11-18 13:29:00 -07:00
vec.c
vec.h remove gdb_string.h 2013-11-18 13:29:00 -07:00
version.h don't keep a gdb-specific date 2013-06-24 15:06:27 +00:00
xml-utils.c
xml-utils.h