From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 108205 invoked by alias); 17 Feb 2016 15:51:42 -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 108183 invoked by uid 89); 17 Feb 2016 15:51:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=news 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; Wed, 17 Feb 2016 15:51:40 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 634A41F587; Wed, 17 Feb 2016 15:51:39 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u1HFpbjj024857; Wed, 17 Feb 2016 10:51:38 -0500 Message-ID: <56C49709.5090605@redhat.com> Date: Wed, 17 Feb 2016 15:51: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 V8 1/1] Intel MPX bound violation handling References: <1454691524-408-1-git-send-email-walfred.tedeschi@intel.com> In-Reply-To: <1454691524-408-1-git-send-email-walfred.tedeschi@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-02/txt/msg00515.txt.bz2 On 02/05/2016 04:58 PM, Walfred Tedeschi wrote: > diff --git a/gdb/NEWS b/gdb/NEWS > index d9cbb80..19985bc 100644 > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -3,6 +3,20 @@ > > *** Changes since GDB 7.10 > > +* Intel MPX bound violation handling. (Please remember to move this to the 7.11 section.) > > static void > diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo > index 7da31c8..3e9b289 100644 > --- a/gdb/doc/gdb.texinfo > +++ b/gdb/doc/gdb.texinfo > @@ -5819,6 +5819,33 @@ $1 = (void *) 0x7ffff7ff7000 > +bounds, while with @code{handle nostop SIGSEGV} no additional > +information is displayed.. Spurious double period. > +void > +i386_linux_handle_segmentation_fault (struct gdbarch *gdbarch, > + struct ui_out *uiout) > +{ > + ui_out_text (uiout, _("]")); > + return; Remove useless return. > +set segv_upper_bound "$u_fault.*$gdb_prompt $" > + > +set segv_lower_bound "$l_fault.*$gdb_prompt $" AFAICS, these two are unused now. Remove them. > +set parameters "print pass nostop" > +with_test_prefix "$parameters" { > + if ![runto_main] { > + fail "could not run to main" > + return -1 > + } > + > + gdb_test "handle SIGSEGV $parameters"\ > + ".*SIGSEGV.*No.*Yes.*Yes.*Segmentation fault.*"\ > + "set parameters" > + > + gdb_test "continue" ".*$segv_with_exit.*" "Display" > + > + gdb_test "where" "No stack." "no inferior $parameters" This "$parameters" here will end up producing redundant test message, given the with_test_prefix already includes that info. Remove it: gdb_test "where" "No stack." "no inferior" Please take look at the resulting gdb.sum file, and check for other similar cases and fix them. The code changes are OK with the above issues addressed. I think you still need to get an OK from Eli, though. Thanks, Pedro Alves