Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Walfred Tedeschi <walfred.tedeschi@intel.com>
To: eliz@gnu.org
Cc: gdb-patches@sourceware.org,
	Walfred Tedeschi <walfred.tedeschi@intel.com>
Subject: [PATCH v3 1/1] Documentation for MPX.
Date: Tue, 03 Dec 2013 12:37:00 -0000	[thread overview]
Message-ID: <1386074172-14177-1-git-send-email-walfred.tedeschi@intel.com> (raw)

Eli,

Thanks for your review!

Phrase starting with: "Architecture registers BND0 through ..."
now reads: "BND0 through ..."

Thanks again and regards,

-Fred

2013-12-03  Walfred Tedeschi  <walfred.tedeschi@intel.com>

	* NEWS:  Add section for Intel(R) Architecture Instructions
	Extesions mentioning MPX.
doc/
	* gdb.texinfo (i386 Features): Add MPX feature registers.
	(x86 Specific featuresx86 Architecture-specific Issues): Adds
	a subsubsection for MPX and describes the display of the
	boundary registers.


---
 gdb/NEWS            |  2 ++
 gdb/doc/gdb.texinfo | 43 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 45 insertions(+)

diff --git a/gdb/NEWS b/gdb/NEWS
index 5110b27..dbc72a6 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -5563,3 +5563,5 @@ GDB now handles cross debugging.  If you are remotely debugging between
 two different machines, type ``./configure host -target=targ''.
 Host is the machine where GDB will run; targ is the machine
 where the program that you are debugging will run.
+
+ *  GDB now supports access to Intel(R) MPX registers on GNU/Linux.
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 004c376..ad496d0 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -21376,6 +21376,39 @@ be returned in a register.
 @kindex show struct-convention
 Show the current setting of the convention to return @code{struct}s
 from functions.
+
+@cindex Intel(R) Memory Protection Extensions (MPX).
+@subsubsection Intel(R) @dfn{Memory Protection Extensions} (MPX).
+
+@item bnd0raw..bnd3raw and bnd0@dots{}bnd3 registers display.
+Memory Protection Extension (MPX) adds the bound registers @samp{BND0}
+@footnote{The register named with capital letters represent the architecture
+registers.} through @samp{BND3}.  Bound registers store a pair of 64-bit values
+which are the lower bound and upper bound.  Bounds are effective addresses or
+memory locations.  The upper bounds are architecturally represented in 1's
+complement form.  A bound having lower bound = 0, and upper bound = 0
+(1's complement of all bits set) will allow access to the entire address space.
+
+@samp{BND0} through @samp{BND3} are represented in @value{GDBN} as @samp{bnd0raw}
+through @samp{bnd3raw}.  Pseudo registers @samp{bnd0} through @samp{bnd3}
+display the upper bound performing the complement of one operation on the
+upper bound value, i.e.@ when upper bound in @samp{bnd0raw} is 0 in the
+@value{GDBN} @samp{bnd0} it will be @code{0xfff@dots{}}.  In this sense it
+can also be noted that the upper bounds are inclusive.
+
+As an example, assume that the register BND0 holds bounds for a pointer having
+access allowed for the range between 0x32 and 0x71.  The values present on
+bnd0raw and bnd registers are presented as follows:
+
+@smallexample
+	bnd0raw = @{0x32, 0xffffffff8e@}
+	bnd0 = @{lbound = 0x32, ubound = 0x71@} : size 64
+@end smallexample
+
+This way the raw value can be accessed via bnd0raw@dots{}bnd3raw.  Any change
+on bnd0@dots{}bnd3 or bnd0raw@dots{}bnd3raw is reflect on its counterpart.  When the
+bnd0@dots{}bnd3 registers are displayed via Python, the display includes the memory size,
+in bits, accessible to the pointer.
 @end table
 
 @node Alpha
@@ -43162,6 +43195,16 @@ describe the upper 128 bits of @sc{ymm} registers:
 @samp{ymm0h} through @samp{ymm15h} for amd64
 @end itemize
 
+The @samp{org.gnu.gdb.i386.mpx} is an optional feature representing Intel(R)
+Memory Protection Extension (MPX).  It should describe the following registers:
+
+@itemize @minus
+@item
+@samp{bnd0raw} through @samp{bnd3raw} for i386 and amd64.
+@item
+@samp{bndcfgu} and @samp{bndstatus} for i386 and amd64.
+@end itemize
+
 The @samp{org.gnu.gdb.i386.linux} feature is optional.  It should
 describe a single register, @samp{orig_eax}.
 
-- 
1.8.3.2


         reply	other threads:[~2013-12-03 12:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-23 13:03 [PATCH V5 0/3] Intel(R) AVX-512 register support Michael Sturm
2014-04-23 13:03 ` [PATCH V5 2/3] Add AVX512 register support to gdbserver Michael Sturm
2014-11-21 10:21   ` Andreas Arnez
2014-12-13 13:41     ` Joel Brobecker
2015-01-08 10:01       ` Sturm, Michael
2015-01-10  7:00         ` Joel Brobecker
2014-04-23 13:03 ` [PATCH V5 3/3] Add AVX512 feature description to GDB manual Michael Sturm
2013-12-03 12:37   ` Walfred Tedeschi [this message]
2013-12-03 12:52     ` [PATCH v3 1/1] Documentation for MPX Eli Zaretskii
2014-08-04 16:57     ` Incorrect placement of two Intel gdb/NEWS items Jan Kratochvil
2014-08-04 19:17       ` Eli Zaretskii
2014-08-04 19:40         ` [commit+7.8] " Jan Kratochvil
2014-04-23 13:04 ` [PATCH V5 1/3] Add AVX512 registers support to GDB Michael Sturm
2014-04-24 11:33   ` Pedro Alves
2014-04-24 11:48   ` Pedro Alves
2014-04-24 11:49 ` [PATCH V5 0/3] Intel(R) AVX-512 register support Pedro Alves

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=1386074172-14177-1-git-send-email-walfred.tedeschi@intel.com \
    --to=walfred.tedeschi@intel.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    /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