From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 111275 invoked by alias); 2 Feb 2016 10:41:28 -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 111258 invoked by uid 89); 2 Feb 2016 10:41:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:ip*10.253.24.23, H*RU:HELO, Hx-spam-relays-external:HELO, Hx-languages-length:2463 X-HELO: mga03.intel.com Received: from mga03.intel.com (HELO mga03.intel.com) (134.134.136.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 02 Feb 2016 10:41:26 +0000 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 02 Feb 2016 02:41:23 -0800 X-ExtLoop1: 1 Received: from wtedesch-mobl2.ger.corp.intel.com (HELO [172.28.205.68]) ([172.28.205.68]) by fmsmga001.fm.intel.com with ESMTP; 02 Feb 2016 02:41:22 -0800 Subject: Re: [PATCH V5 5/5] ntel MPX bound violation handling To: Pedro Alves , eliz@gnu.org, brobecker@adacore.com References: <1453474456-13169-1-git-send-email-walfred.tedeschi@intel.com> <1453474456-13169-6-git-send-email-walfred.tedeschi@intel.com> <56AA1ADD.3080206@redhat.com> <56B08055.1060507@intel.com> <56B0871F.6060201@redhat.com> Cc: gdb-patches@sourceware.org From: Walfred Tedeschi Message-ID: <56B087D1.7030900@intel.com> Date: Tue, 02 Feb 2016 10:41:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <56B0871F.6060201@redhat.com> Content-Type: text/plain; charset="windows-1252"; format="flowed" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-02/txt/msg00048.txt.bz2 Am 2/2/2016 um 11:38 AM schrieb Pedro Alves: > On 02/02/2016 10:09 AM, Walfred Tedeschi wrote: >> Am 1/28/2016 um 2:42 PM schrieb Pedro Alves: >> Pedro, >> >> I have tried to address all your comments. > > I quickly skimmed v6 (will have to look in more detail), but looks like > you missed the renaming comments. See them quoted below. > >> For the tests I also verified that there was only one line in the log as >> shown in the wiki. > > Thanks. > >> Have though some comments below: >> > >>> # Function called when a segmentation fault with >>> # SIGCODE 3 (SIG_CODE_BOUNDARY_FAULT) is received by the inferior. >>> >>> But, see below. > >>>> + >>>> +static void >>>> +handle_segmentation_faults (struct ui_out *uiout) >>> >>> "handle_segmentation_fault", singular. > > ... > >>> And then the gdbarch hook can be renamed to a more generic >>> gdbarch_handle_segmentation_fault. > > ... > > The comments thoughout should be >>> updated then, like, for this function: >>> >>> /* Some targets/architectures can do extra processing/display of >>> segmentation faults. E.g., Intel MPX boundary faults. >>> Call the architecture dependent function to handle the fault. */ >>> >>> static void >>> handle_segmentation_fault (struct ui_out *uiout) >>> { >>> > > (You did update the comment.) > >>>> +for {set i 0} {$i < 15} {incr i} { >>>> + set message "MPX signal segv Upper: ${i}" >>>> + gdb_test_multiple "continue" "$message ${i}" { >>>> + -re $segv_upper_bound { >>>> + pass "$message" >>>> + } >>>> + -re ".*$inferior_exited_re normally.*$gdb_prompt $" { >>>> + fail "$message" >>> >>> The pass/fail calls are missing ${i}. Please make sure test >>> messages are unique in gdb.sum: >> >> In fail and pass i think we do not need the ${i} it is added at the >> message level already see: >> >> set message "MPX signal segv Upper: ${i}" > > In that case, you shouldn't have an "${i}" in this line: > > + gdb_test_multiple "continue" "$message ${i}" { > > because then that expands to "... ${i} ${i}". > > Thanks, > Pedro Alves > Pedro, Thanks a lot! I will do it still today. Regards, -Fred 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