From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7869) id D9870385840C; Tue, 12 Mar 2024 14:32:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D9870385840C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1710253967; bh=k6F5wcHVBu1c9gNTOtGq7342sOU8SvekB23AXfg+Zes=; h=From:To:Subject:Date:From; b=T8iipbcMclMOKiV6PLXHTseH5RH0SQezrhysSwT/I2RnSZGMSHmoHsCpIoTbuY+4p p3tc8oD2WzRVq/t3iZm7hnvMYpSxU9n+W3EozyjHxn+C+xMUEW8KOeL9IPMAevvaAl 3t3ggAi0y+/Yjt2Zo9re6SNW1ZvUy1/Ii5k4WT8M= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Christina Schimpe To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb: Deprecate MPX commands. X-Act-Checkin: binutils-gdb X-Git-Author: Schimpe, Christina X-Git-Refname: refs/heads/master X-Git-Oldrev: 272acb42cfc4e64af4f702f24fbc1de078372c38 X-Git-Newrev: 7650ea38908e98a5823a334286813eca2ff5719e Message-Id: <20240312143247.D9870385840C@sourceware.org> Date: Tue, 12 Mar 2024 14:32:47 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D7650ea38908e= 98a5823a334286813eca2ff5719e commit 7650ea38908e98a5823a334286813eca2ff5719e Author: Schimpe, Christina Date: Tue Mar 5 15:14:53 2024 +0000 gdb: Deprecate MPX commands. =20 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. Diff: --- 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 @@ =20 *** Changes since GDB 14 =20 +* 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. =20 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 @v= ar{ubound} are new values for lower and upper bounds respectively. @end table =20 +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\"."), =20 /* Add "bound" command for the show mpx commands list. */ =20 - add_cmd ("bound", no_class, i386_mpx_info_bounds, + cmd_list_element *c =3D 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); =20 /* Add "bound" command for the set mpx commands list. */ =20 - add_cmd ("bound", no_class, i386_mpx_set_bounds, + c =3D 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); =20 gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_SVR4, i386_svr4_init_abi);