From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 90352 invoked by alias); 15 Feb 2017 13:02:15 -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 90320 invoked by uid 89); 15 Feb 2017 13:02:13 -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,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=U*brobecker, sk:brobeck, brobeckeradacorecom, brobecker@adacore.com X-HELO: mga05.intel.com Received: from mga05.intel.com (HELO mga05.intel.com) (192.55.52.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 15 Feb 2017 13:02:03 +0000 Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP; 15 Feb 2017 05:01:51 -0800 X-ExtLoop1: 1 Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by fmsmga006.fm.intel.com with ESMTP; 15 Feb 2017 05:01:50 -0800 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.142]) by irsmsx110.ger.corp.intel.com ([169.254.15.101]) with mapi id 14.03.0248.002; Wed, 15 Feb 2017 13:01:49 +0000 From: "Tedeschi, Walfred" To: Pedro Alves , "qiyaoltc@gmail.com" , "brobecker@adacore.com" CC: "gdb-patches@sourceware.org" Subject: RE: [PATCH V7] amd64-mpx: initialize bnd register before performing inferior calls. Date: Wed, 15 Feb 2017 13:02:00 -0000 Message-ID: References: <1485875613-31975-1-git-send-email-walfred.tedeschi@intel.com> <53d42bb6-3b83-6213-4087-6d30e7d837de@redhat.com> <217a8c13-b7d0-7fe6-56b5-85ff53ce097a@intel.com> <88c7180f-8843-a148-425a-2adf56c6d0bf@redhat.com> <32693426-fbaf-8345-04c7-e2c329d6ec6e@intel.com> In-Reply-To: Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-02/txt/msg00410.txt.bz2 -----Original Message----- From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-owner@sourceware= .org] On Behalf Of Pedro Alves Sent: Tuesday, February 14, 2017 1:59 PM To: Tedeschi, Walfred ; qiyaoltc@gmail.com; bro= becker@adacore.com Cc: gdb-patches@sourceware.org Subject: Re: [PATCH V7] amd64-mpx: initialize bnd register before performin= g inferior calls. Hello Pedro, On 02/14/2017 01:34 PM, Tedeschi, Walfred wrote: > On 02/13/2017 09:33 AM, Tedeschi, Walfred wrote: >> At the inferior call time all BND registers are set to the INIT state. >> That covers 90% of the usage case and keeps the actual behavior of GDB. >> In case it is desirable to investigate any bound violation user can=20 >> add a breakpoint on the prolog of the function and set the BND=20 >> register there, I understand that this is the normal use case for the=20 >> debugger as well. > In reality it did not work as expected. When an inferior call is done=20 > and there is a breakpoint in the executed GDB issues a message like: >=20 > "The program being debugged stopped while in a function called from GDB. > Evaluation of the expression containing the function > (foo) will be abandoned. > When the function is done executing, GDB will silently stop." This looks normal. What were you expecting instead? -- Fred:=20 Message per se is fine. I was expecting that the inferior call should run i= solated, exemplifying: 1. Inferior is stopped. 2. inferior call is done. 3. breakpoint in inferior call is triggered. 4. continue is issued. 5. signal is presented to the user. 6. continue is issued again. 7. expected - control should be back to 1, i.e. on stop mode. 7. actual behavior - application finishes with the signal 8. actual behavior - after the breakpoint no result will be displayed to th= e user (about the inf call) In 6 if I use return instead I fall back to my expected behavior. In this s= ense, I think the user can work in that way. I will continue a bit more testing now. I have got confused with an interme= diate version 01/27/2017. It was not displaying the signal step (5), now it is on again.=20 -- > Also after that no signal generated within the function call is reported. Please clarify. Fred: I tried to summarize above, not sure I succeeded.=20 Fred: Additional comment: Trying that now I am considering that this as a whole is more complicated t= han expected.=20 Too many actions to realize the simple thing that is set a register before = an inferior call and perform the call. I am inclined to give it a try in creating set/show for the feature and see= how it behaves.=20 In fact I will do it and submit the V8 based on that let's see how it looks= like. Thanks a lot for the review! Best regards, /Fred > Not sure if this a limitation or a bug. In case you think it is a bug=20 > i can add some entries in Bugzilla. Thanks, Pedro Alves Intel Deutschland GmbH Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Christian Lamprechter Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928