From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17494 invoked by alias); 3 Mar 2016 20:34:31 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 17464 invoked by uid 89); 3 Mar 2016 20:34:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:2060, HX-Received-From:4830, HX-Received-From:134, HX-Received-From:2001 X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 03 Mar 2016 20:34:29 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1abZx2-0004kJ-Jy for gdb-patches@sourceware.org; Thu, 03 Mar 2016 15:34:27 -0500 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60021) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abZx2-0004k9-GY; Thu, 03 Mar 2016 15:34:24 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1471 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1abZx1-0007ev-JD; Thu, 03 Mar 2016 15:34:24 -0500 Date: Thu, 03 Mar 2016 20:34:00 -0000 Message-Id: <83wppjz4fo.fsf@gnu.org> From: Eli Zaretskii To: Walfred Tedeschi CC: palves@redhat.com, brobecker@adacore.com, gdb-patches@sourceware.org In-reply-to: <56D81A29.3040007@intel.com> (message from Walfred Tedeschi on Thu, 3 Mar 2016 12:04:09 +0100) Subject: Re: [PATCH V4 2/2] Add mpx-bnd-init-on-return set/show command for inferior calls. Reply-to: Eli Zaretskii References: <1456935689-1820-1-git-send-email-walfred.tedeschi@intel.com> <1456935689-1820-3-git-send-email-walfred.tedeschi@intel.com> <83ziug6dnw.fsf@gnu.org> <56D81A29.3040007@intel.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-IsSubscribed: yes X-SW-Source: 2016-03/txt/msg00058.txt.bz2 > Cc: palves@redhat.com, brobecker@adacore.com, gdb-patches@sourceware.org > From: Walfred Tedeschi > Date: Thu, 3 Mar 2016 12:04:09 +0100 > > NEWS: > show mpx-bnd-init-on-return > set mpx-bnd-init-on-return on i386 and amd64 > In case MPX-BND-INIT-ON-RETURN is true, bound registers > will be initialized when the "return" command is used. > > > gdb.texinfo: > While calling functions from the debugger, of an Intel MPX enabled program, > boundary registers have to be set to the INIT state before performing the > call, to avoid boundary violations while performing the call. A bound is > defined to be in the INIT state when the pointer associated to that boundary > can access the whole memory, in this case the register bound register > associated to it has value 0, e.g. if the register associated is bnd0raw > its value will be @{0x0, 0x0@}. > > When you use the @code{return} command, the bound registers might > cause boundary violations because they were not updated for the > early return from the function. > To countermand that, @value{GDBN} can force initialization of the > bound registers when it performs the @code{return} command. This is > controlled by the following option: > > @table @code > @kindex set mpx-bnd-init-on-return > When set to true bound registers will be set to the INIT state when > using the "return" command. > @kindex show mpx-bnd-init-on-return > Show the state of mpx-bnd-init-on-return. > @end table > > and info for the new command: > add_setshow_boolean_cmd ("mpx-bnd-init-on-return", no_class, > &mpx_bnd_init_on_return, _("\ > Set the bnd registers to INIT state when returning from a call."), _("\ > Show whether to set the bnd registers to INIT state when returning > from a call."), > > > Would that be ok with you? Yes, except that please change the documentation of "show mpx-bnd-init-on-return" in the manual to say the same as in the doc string of the add_setshow_boolean_cmd call. Thanks.