From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94588 invoked by alias); 2 Feb 2016 10:38: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 94574 invoked by uid 89); 2 Feb 2016 10:38: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_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1951 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 02 Feb 2016 10:38:26 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 5165E804EC; Tue, 2 Feb 2016 10:38:25 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u12AcNAp029918; Tue, 2 Feb 2016 05:38:24 -0500 Message-ID: <56B0871F.6060201@redhat.com> Date: Tue, 02 Feb 2016 10:38:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Walfred Tedeschi , eliz@gnu.org, brobecker@adacore.com CC: gdb-patches@sourceware.org Subject: Re: [PATCH V5 5/5] ntel MPX bound violation handling 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> In-Reply-To: <56B08055.1060507@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-02/txt/msg00047.txt.bz2 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