From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 123468 invoked by alias); 27 Nov 2017 12:11:33 -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 123407 invoked by uid 89); 27 Nov 2017 12:11:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=BAYES_00,KB_WAM_FROM_NAME_SINGLEWORD,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy= 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 ESMTP; Mon, 27 Nov 2017 12:11:20 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 30345C047B91; Mon, 27 Nov 2017 12:11:19 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 513725D9C9; Mon, 27 Nov 2017 12:11:18 +0000 (UTC) Subject: Re: [RFA/doco] (Ada) provide the exception message when hitting an exception catchpoint To: Joel Brobecker References: <1510953646-116765-1-git-send-email-brobecker@adacore.com> <3f9c312c-deba-f6b1-838e-d0cddf244752@redhat.com> <20171125020534.k4zk7ccpuwnzuspc@adacore.com> Cc: gdb-patches@sourceware.org, Xavier Roirand From: Pedro Alves Message-ID: <67cc8f82-e8db-b34c-8da9-38e2a7795444@redhat.com> Date: Mon, 27 Nov 2017 12:11:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20171125020534.k4zk7ccpuwnzuspc@adacore.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-11/txt/msg00683.txt.bz2 On 11/25/2017 02:05 AM, Joel Brobecker wrote: >> +ERROR: tcl error sourcing /home/pedro/gdb/src/gdb/testsuite/gdb.ada/mi_catch_ex.exp. >> +ERROR: can't read "exception_name(",exception-message="foo\.adb:[0-9]+ explicit raise)": variable isn't array >> + while executing >> +"mi_expect_stop "breakpoint-hit\",disp=\"keep\",bkptno=\"$any_nb\",exception-name=\"$exception_name(\",exception-message=\"$exception_message)?" "foo..." >> + (procedure "continue_to_exception" line 17) >> + invoked from within >> +"continue_to_exception \ >> + "CONSTRAINT_ERROR" "foo\\.adb:$decimal explicit raise" \ >> + "continue until CE caught by all-exceptions catchpoint"" >> + (file "/home/pedro/gdb/src/gdb/testsuite/gdb.ada/mi_catch_ex.exp" line 106) >> + invoked from within >> +"source /home/pedro/gdb/src/gdb/testsuite/gdb.ada/mi_catch_ex.exp" >> + ("uplevel" body line 1) >> + invoked from within >> +"uplevel #0 source /home/pedro/gdb/src/gdb/testsuite/gdb.ada/mi_catch_ex.exp" >> + invoked from within >> +"catch "uplevel #0 source $test_file_name"" > > Grumpf. Sorry about that. I'm not sure why it was working for me > before. I was able to reproduce on a different machine, but noticed > another error in the process. Attached is a tentative patch. It gives > me clean results (15 PASSes). Does it work for you? Yup, works for me. Thanks, Pedro Alves > > gdb/testsuite/ChangeLog: > > * gdb.ada/mi_catch_ex.exp (continue_to_exception): Adjust > expected output in gdb_expect call to allow the exception > message to be present as well. Fix syntax confusion to avoid > TCL thinking that exception_name is an array. >