Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Walfred Tedeschi <walfred.tedeschi@intel.com>
To: tromey@redhat.com, gdb-patches@sourceware.org, mark.kettenis@xs4all.nl
Cc: Walfred Tedeschi <walfred.tedeschi@intel.com>
Subject: [PATCH V4 0/8] Intel(R) MPX register support
Date: Mon, 09 Sep 2013 12:25:00 -0000	[thread overview]
Message-ID: <1378729481-9105-1-git-send-email-walfred.tedeschi@intel.com> (raw)

This patch series adds support for the Intel(R) Memory Protection 
Extension MPX registers.  Native and remote debugging are covered
by this patch.

New registers are bound registers known as bnd register (bnd0...bnd3),
a configuration register bndcfgu and a status register bndstatus.  Bound
registers store pointer bounds, i.e. bound limits of a pointer.  Bndstatus
and bndcfgu store information of the current status and configuration
of other MPX counterparts.  For more information [1][2].

Design notes:
Bound register are represented in hardware as two fields of 64bits each,
both in 64bit and 32bit mode. The fields are lower bound and upper bound.
Upper bound value is a complement of one value of the upper limiting
address. To take this into account the bnd0...bnd3 are created as pseudo
registers while the hardware values are stored on bnd0raw...bnd3raw.

Ok to commit?

References:
[1] Intel(R) Architecture Instruction Set Extensions Programming Reference.
http://download-software.intel.com/sites/default/files/319433-015.pdf.
[2] http://software.intel.com/en-us/intel-isa-extensions. 

Changes between V4 and V5:

	* Improved text for MPX feature on gdb.texinfo following Eli indications.
	* Fixed one table that still had ORIG_EAX and ORIG_RAX in the middle.

Changes between V3 and V4:

	* Added NEWS entry for MPX.
	* Improved text for MPX feature on gdb.texinfo.
	* Fixed several ChangeLogs.

Changes between V2 and V3:

	* Small changes on changelogs: "Add MPX support for i386" and "Add 
	support for MPX amd64".
	* Add MPX feature documentation as extra patch.

Changes between V1 and V2:

	* Folowing the Mark Kettenis feedback: Orig_rax and orig_eax are left as the
	last register on the internal list.
	* Ported gcc file used for cpuid and corrected overlooked condition to 
	detect MPX hardware while performing MPX related tests. 

Walfred Tedeschi (8):
  Fix conditions in creating a bitfield.
  Add MPX registers XML files.
  Add MPX support for i386
  MPX for amd64
  Add MPX support to gdbserver.
  Add pretty-printer for MPX bnd registers.
  Add MPX registers tests.
  Add MPX feature description to GDB manual.

 gdb/NEWS                                      |    2 +
 gdb/amd64-linux-nat.c                         |   43 +++--
 gdb/amd64-linux-tdep.c                        |   14 +-
 gdb/amd64-linux-tdep.h                        |    6 +-
 gdb/amd64-tdep.c                              |   18 +++
 gdb/amd64-tdep.h                              |    8 +-
 gdb/common/i386-gcc-cpuid.h                   |    8 +-
 gdb/common/i386-xstate.h                      |   21 ++-
 gdb/data-directory/Makefile.in                |    1 +
 gdb/doc/gdb.texinfo                           |   22 +++
 gdb/features/Makefile                         |   38 ++++-
 gdb/features/i386/32bit-mpx.xml               |   43 +++++
 gdb/features/i386/64bit-mpx.xml               |   43 +++++
 gdb/features/i386/amd64-mpx-linux.c           |  211 ++++++++++++++++++++++++
 gdb/features/i386/amd64-mpx-linux.xml         |   19 +++
 gdb/features/i386/amd64-mpx.c                 |  206 +++++++++++++++++++++++
 gdb/features/i386/amd64-mpx.xml               |   17 ++
 gdb/features/i386/i386-mpx-linux.c            |  187 +++++++++++++++++++++
 gdb/features/i386/i386-mpx-linux.xml          |   19 +++
 gdb/features/i386/i386-mpx.c                  |  182 +++++++++++++++++++++
 gdb/features/i386/i386-mpx.xml                |   17 ++
 gdb/features/i386/x32-mpx-linux.c             |  211 ++++++++++++++++++++++++
 gdb/features/i386/x32-mpx-linux.xml           |   19 +++
 gdb/features/i386/x32-mpx.c                   |  206 +++++++++++++++++++++++
 gdb/features/i386/x32-mpx.xml                 |   17 ++
 gdb/gdbserver/Makefile.in                     |   15 ++
 gdb/gdbserver/configure.srv                   |   20 +--
 gdb/gdbserver/i387-fp.c                       |   90 +++++++++++
 gdb/gdbserver/linux-x86-low.c                 |   87 ++++++++--
 gdb/i386-linux-nat.c                          |   17 +-
 gdb/i386-linux-tdep.c                         |    9 +-
 gdb/i386-linux-tdep.h                         |    6 +-
 gdb/i386-tdep.c                               |  216 ++++++++++++++++++++++++-
 gdb/i386-tdep.h                               |   30 +++-
 gdb/i387-tdep.c                               |  130 ++++++++++++++-
 gdb/i387-tdep.h                               |    7 +
 gdb/python/lib/gdb/command/bound_registers.py |   45 ++++++
 gdb/regformats/i386/amd64-mpx-linux.dat       |   84 ++++++++++
 gdb/regformats/i386/amd64-mpx.dat             |   83 ++++++++++
 gdb/regformats/i386/i386-mpx-linux.dat        |   60 +++++++
 gdb/regformats/i386/i386-mpx.dat              |   59 +++++++
 gdb/regformats/i386/x32-mpx-linux.dat         |   84 ++++++++++
 gdb/regformats/i386/x32-mpx.dat               |   83 ++++++++++
 gdb/target-descriptions.c                     |    2 +-
 gdb/testsuite/gdb.arch/i386-mpx.c             |   92 +++++++++++
 gdb/testsuite/gdb.arch/i386-mpx.exp           |  142 ++++++++++++++++
 gdb/testsuite/gdb.python/py-pp-maint.exp      |    8 +-
 gdb/testsuite/gdb.xml/maint_print_struct.xml  |    1 +
 48 files changed, 2875 insertions(+), 73 deletions(-)
 create mode 100644 gdb/features/i386/32bit-mpx.xml
 create mode 100644 gdb/features/i386/64bit-mpx.xml
 create mode 100644 gdb/features/i386/amd64-mpx-linux.c
 create mode 100644 gdb/features/i386/amd64-mpx-linux.xml
 create mode 100644 gdb/features/i386/amd64-mpx.c
 create mode 100644 gdb/features/i386/amd64-mpx.xml
 create mode 100644 gdb/features/i386/i386-mpx-linux.c
 create mode 100644 gdb/features/i386/i386-mpx-linux.xml
 create mode 100644 gdb/features/i386/i386-mpx.c
 create mode 100644 gdb/features/i386/i386-mpx.xml
 create mode 100644 gdb/features/i386/x32-mpx-linux.c
 create mode 100644 gdb/features/i386/x32-mpx-linux.xml
 create mode 100644 gdb/features/i386/x32-mpx.c
 create mode 100644 gdb/features/i386/x32-mpx.xml
 create mode 100644 gdb/python/lib/gdb/command/bound_registers.py
 create mode 100644 gdb/regformats/i386/amd64-mpx-linux.dat
 create mode 100644 gdb/regformats/i386/amd64-mpx.dat
 create mode 100644 gdb/regformats/i386/i386-mpx-linux.dat
 create mode 100644 gdb/regformats/i386/i386-mpx.dat
 create mode 100644 gdb/regformats/i386/x32-mpx-linux.dat
 create mode 100644 gdb/regformats/i386/x32-mpx.dat
 create mode 100644 gdb/testsuite/gdb.arch/i386-mpx.c
 create mode 100644 gdb/testsuite/gdb.arch/i386-mpx.exp

-- 
1.7.10.4


             reply	other threads:[~2013-09-09 12:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-09 12:25 Walfred Tedeschi [this message]
2013-09-09 12:24 ` [PATCH V5 1/8] Fix conditions in creating a bitfield Walfred Tedeschi
2013-09-09 12:25 ` [PATCH V5 5/8] Add MPX support to gdbserver Walfred Tedeschi
2013-09-09 12:25 ` [PATCH V5 3/8] Add MPX support for i386 Walfred Tedeschi
2013-09-09 12:25 ` [PATCH V5 6/8] Add pretty-printer for MPX bnd registers Walfred Tedeschi
2013-09-09 12:25 ` [PATCH V5 8/8] Add MPX feature description to GDB manual Walfred Tedeschi
2013-09-09 16:35   ` Eli Zaretskii
2013-09-09 12:25 ` [PATCH V5 4/8] MPX for amd64 Walfred Tedeschi
2013-09-09 12:25 ` [PATCH V5 7/8] Add MPX registers tests Walfred Tedeschi
2013-09-09 12:25 ` [PATCH V5 2/8] Add MPX registers XML files Walfred Tedeschi
  -- strict thread matches above, loose matches on Subject: below --
2013-09-05  9:26 [PATCH V4 0/8] Intel(R) MPX register support Walfred Tedeschi
2013-09-05  9:41 ` Eli Zaretskii
     [not found]   ` <AC542571535E904D8E8ADAE745D60B191B18DB69@IRSMSX104.ger.corp.intel.com>
2013-09-09 16:32     ` Eli Zaretskii
2013-09-25 11:51       ` Tedeschi, Walfred
2013-09-25 12:33         ` Eli Zaretskii
2013-09-25 12:41           ` Tedeschi, Walfred
2013-09-25 15:37             ` Eli Zaretskii
2013-09-25 12:47           ` Mark Kettenis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1378729481-9105-1-git-send-email-walfred.tedeschi@intel.com \
    --to=walfred.tedeschi@intel.com \
    --cc=gdb-patches@sourceware.org \
    --cc=mark.kettenis@xs4all.nl \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox