]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: Deprecate MPX commands.
authorSchimpe, Christina <christina.schimpe@intel.com>
Tue, 5 Mar 2024 15:14:53 +0000 (15:14 +0000)
committerSchimpe, Christina <christina.schimpe@intel.com>
Tue, 12 Mar 2024 13:54:29 +0000 (13:54 +0000)
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
gdb/doc/gdb.texinfo
gdb/i386-tdep.c

index 2638b3e0d9ca573d4e284f4f26d19409123ebc7b..d8ac0bb06a754092db03e14d88c0116a15a9b02c 100644 (file)
--- 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.
 
index 34cd567f81189cc32b88c33aae3b658ae58f0801..6099d125a60f496297c72894f901fedc77c1da5c 100644 (file)
@@ -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
index b487a3f74788364c86fc4aa0605cde57488509e7..0d4e30b9a4e4901e732d89ea821060e9cfd06e42 100644 (file)
@@ -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);