public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/1] gdb: Deprecate MPX commands.
@ 2024-03-07 12:11 Schimpe, Christina
  2024-03-07 12:34 ` Eli Zaretskii
  2024-03-08 16:20 ` Tom Tromey
  0 siblings, 2 replies; 7+ messages in thread
From: Schimpe, Christina @ 2024-03-07 12:11 UTC (permalink / raw)
  To: gdb-patches

This patch deprecates the MPX commands "show/set mpx bound".
Intel listed Intel(R) Memory Protection Extensions (MPX) as removed
in 2019.  Following gcc v9.1, the linux kernel v5.6 and glibc v2.35,
deprecate MPX in GDB.
---
 gdb/NEWS            | 3 +++
 gdb/doc/gdb.texinfo | 3 +++
 gdb/i386-tdep.c     | 6 ++++--
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/gdb/NEWS b/gdb/NEWS
index 2638b3e0d9c..d8ac0bb06a7 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -3,6 +3,9 @@
 
 *** Changes since GDB 14
 
+* The MPX commands "show/set mpx bound" have been deprecated, as Intel
+  listed MPX as removed in 2019.
+
 * Building GDB and GDBserver now requires a C++17 compiler.
   For example, GCC 9 or later.
 
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 34cd567f811..6099d125a60 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -26652,6 +26652,9 @@ whose bounds are to be changed, @var{lbound} and @var{ubound} are new values
 for lower and upper bounds respectively.
 @end table
 
+Both commands are deprecated and will be removed in future versions of
+@value{GDBN}.  MPX itself was listed as removed by Intel in 2019.
+
 When you call an inferior function on an Intel MPX enabled program,
 GDB sets the inferior's bound registers to the init (disabled) state
 before calling the function.  As a consequence, bounds checks for the
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index b487a3f7478..0d4e30b9a4e 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -9132,17 +9132,19 @@ is \"default\"."),
 
   /* Add "bound" command for the show mpx commands list.  */
 
-  add_cmd ("bound", no_class, i386_mpx_info_bounds,
+  cmd_list_element *c = add_cmd ("bound", no_class, i386_mpx_info_bounds,
 	   "Show the memory bounds for a given array/pointer storage\
  in the bound table.",
 	   &mpx_show_cmdlist);
+  deprecate_cmd (c, nullptr);
 
   /* Add "bound" command for the set mpx commands list.  */
 
-  add_cmd ("bound", no_class, i386_mpx_set_bounds,
+  c = add_cmd ("bound", no_class, i386_mpx_set_bounds,
 	   "Set the memory bounds for a given array/pointer storage\
  in the bound table.",
 	   &mpx_set_cmdlist);
+  deprecate_cmd (c, nullptr);
 
   gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_SVR4,
 			  i386_svr4_init_abi);
-- 
2.34.1

Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva  
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-03-12 14:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-07 12:11 [PATCH 1/1] gdb: Deprecate MPX commands Schimpe, Christina
2024-03-07 12:34 ` Eli Zaretskii
2024-03-07 12:40   ` Schimpe, Christina
2024-03-07 13:10     ` Eli Zaretskii
2024-03-07 13:30     ` Joel Brobecker
2024-03-08 16:20 ` Tom Tromey
2024-03-12 14:35   ` Schimpe, Christina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).