From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43841 invoked by alias); 23 Dec 2015 15:21:52 -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 43823 invoked by uid 89); 23 Dec 2015 15:21:52 -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_HELO_PASS autolearn=ham version=3.3.2 spammy=convoluted, humpf, bouh, harness 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, 23 Dec 2015 15:21:51 +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 E21D6C0B7E3F; Wed, 23 Dec 2015 15:21:49 +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 tBNFLm3h010199; Wed, 23 Dec 2015 10:21:49 -0500 Message-ID: <567ABC0C.3040204@redhat.com> Date: Wed, 23 Dec 2015 15:21: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: Joel Brobecker CC: gdb-patches@sourceware.org Subject: Re: [RFC/commmit] [testsuite/Ada] stop using project files when building test programs References: <1450798411-26617-1-git-send-email-brobecker@adacore.com> <567A9FE6.30504@redhat.com> <20151223133504.GB18676@adacore.com> <20151223144303.GC18676@adacore.com> In-Reply-To: <20151223144303.GC18676@adacore.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-12/txt/msg00468.txt.bz2 On 12/23/2015 02:43 PM, Joel Brobecker wrote: >> > Humpf, that's a fair number of reasons showing that assuming 8.6 >> > may not be reasonable. Bouh... >> > >>> > > How hard would it be to avoid try/finally? Wouldn't you just have to >>> > > use catch instead? >> > >> > I don't think it would be very hard. I think catch will work, but >> > will be a little more convoluted. I'll give it a try... > Still, for a complete dummy like myself, that took nearly 45 minutes, > just to make sure I understand TCL semantics better, and find a machine > that has TCL 8.5... > Thanks for doing this. > I would appreciate a review of the attached patch, because TCL and > I are not regular friends. :-) Looks generally good to me. A couple minor comments below. > --- a/gdb/testsuite/gdb.ada/cond_lang.exp > +++ b/gdb/testsuite/gdb.ada/cond_lang.exp > @@ -39,7 +39,7 @@ gdb_test "show lang" \ > # current language mode is auto, and the breakpoint is inside Ada code. > set bp_location [gdb_get_line_number "STOP" ${testdir}/mixed.adb] > gdb_test "break mixed.adb:${bp_location} if light = green" \ > - "Breakpoint \[0-9\]* at .*: file .*/mixed.adb, line \[0-9\]*\\." > + "Breakpoint \[0-9\]* at .*: file (.*/)?mixed.adb, line \[0-9\]*\\." Isn't that the same as just: - "Breakpoint \[0-9\]* at .*: file .*/mixed.adb, line \[0-9\]*\\." + "Breakpoint \[0-9\]* at .*: file .*mixed.adb, line \[0-9\]*\\." ? > gdb_test "continue" \ > - "Breakpoint .*, pck\\.call_me \\(w=(w@entry=)?50\\) at .*/pck.adb:.*" \ > + "Breakpoint .*, pck\\.call_me \\(w=(w@entry=)?50\\) at (.*)?/pck.adb:.*" \ > "continue to call_me" Likewise, I think this is a no-op. Did you mean to put the / inside the parens like in the other case? If so I'd suggest: - "Breakpoint .*, pck\\.call_me \\(w=(w@entry=)?50\\) at .*/pck.adb:.*" \ + "Breakpoint .*, pck\\.call_me \\(w=(w@entry=)?50\\) at .*pck.adb:.*" \ > > # And just to make sure, we also verify that the parameter value > diff --git a/gdb/testsuite/lib/ada.exp b/gdb/testsuite/lib/ada.exp > index 6a1e192..28284ff 100644 > --- a/gdb/testsuite/lib/ada.exp > +++ b/gdb/testsuite/lib/ada.exp > @@ -13,6 +13,26 @@ > # You should have received a copy of the GNU General Public License > # along with this program. If not, see . > > +# Call target_compile with SOURCE DEST TYPE and OPTIONS as argument, > +# after having temporarily changed the current working directory to > +# BUILDDIR. > +# > +# FIXME: brobecke/2015-12-23: We can get rid of this function entirely > +# when we are able to migrate to TCL 8.6, which added support for > +# try { ... } finally {...} constructs. Despite being released on > +# December 2012, that version is still far from being widely used > +# (in particular in the more exotic systems of the GCC compile farm). Not sure this FIXME comment here turns out useful going forward. We have many other instances of catch in the harness. And, IMO, having a wrapper function looks nicer than open coding try/finally at the caller. Once we rely on 8.6 and thus try/finally, I would think we'd keep the wrapper function, but reimplement its body with try/finally instead. Thanks, Pedro Alves