From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54916 invoked by alias); 1 Jul 2015 08:49:50 -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 54904 invoked by uid 89); 1 Jul 2015 08:49:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f44.google.com Received: from mail-pa0-f44.google.com (HELO mail-pa0-f44.google.com) (209.85.220.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 01 Jul 2015 08:49:48 +0000 Received: by pacws9 with SMTP id ws9so20236791pac.0 for ; Wed, 01 Jul 2015 01:49:47 -0700 (PDT) X-Received: by 10.70.133.170 with SMTP id pd10mr52764478pdb.127.1435740587125; Wed, 01 Jul 2015 01:49:47 -0700 (PDT) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by mx.google.com with ESMTPSA id cz1sm1417453pbc.84.2015.07.01.01.49.44 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 01 Jul 2015 01:49:46 -0700 (PDT) From: Yao Qi To: "Tedeschi\, Walfred" Cc: Yao Qi , Patrick Palka , Doug Evans , Keith Seitz , gdb-patches Subject: Re: Several regressions and we branch soon. References: <5589BECB.7090200@redhat.com> <86mvzpqq1z.fsf@gmail.com> Date: Wed, 01 Jul 2015 08:49:00 -0000 In-Reply-To: (Walfred Tedeschi's message of "Thu, 25 Jun 2015 16:35:08 +0000") Message-ID: <86pp4cp8ii.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg00002.txt.bz2 "Tedeschi, Walfred" writes: > This command was proposed initially as an standalone like: > > Set-mpx-bound and show-mpx-bound. > > Recommendation was to introduce it in the sets and shows, which I have ag= reed. > Also because "set" is also used to set values of variables when used alon= e. > Which is similar to what "set mpx bound" is doing, In this sense it > can be considered as the right category to have it, as Joel indicated. > > About the show, well that is the natural counterpart of the set, right? > > Also, I agree with Yao patch. I would use a "warning" instead. > > Initialization of the command can be placed in a different location. I > could think of adding them at the validation of the tdesc, i.e. > I386_validate_tdesc_p and amd64_validate_tdesc_p. Would you agree with t= hat? > > Open questions are: > 1. Command call. Should they still be called "set mpx bound" / "show > mpx bound" Command "show mpx bound" expects an argument, which is an address. Is this argument mandatory? In other words, can gdb scan bound directory and bound table from inferior memory and print all entries? this would be slow, but "show mpx bound" doesn't need an argument. After I read intel mpx doc and the patch, I have more questions in my mind, - if program doesn't set mpx bounds at all, GDB attaches to the program, and set mpx bounds, when GDB detaches from this program, does GDB need to clear these mpx bounds it sets? - if program does set mpx bounds too (through mpx instructions or compiler builtins), do we expect GDB to show these mpx bounds too? - If program sets mpx bounds through mxp instructions and GDB sets mpx bounds too, does this interfere each other? or program's mxp bounds setting is stored in bnd0-bnd3, but GDB's mpx bound setting is bound directory and bound table, so this doesn't interfere each other? > 2. Should initialization move to the validation routine? If we do so, commands are not shown up on the target doesn't meet the requirements of commands. After some thinking, I prefer registering mpx commands unconditionally even target doesn't support mpx. The "show" command still can tell user that this command doesn't work on this target. Otherwise, it should be confusing that some commands disappear silently. --=20 Yao (=E9=BD=90=E5=B0=A7)