From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17269 invoked by alias); 15 Nov 2013 16:45:48 -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 17259 invoked by uid 89); 15 Nov 2013 16:45:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL,BAYES_00,RDNS_NONE,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: rock.gnat.com Received: from Unknown (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 15 Nov 2013 16:45:46 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 70B1A116592; Fri, 15 Nov 2013 11:46:10 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id lqA3CXVtUrMU; Fri, 15 Nov 2013 11:46:10 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 0550E116522; Fri, 15 Nov 2013 11:46:10 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id B15E1E183D; Fri, 15 Nov 2013 20:45:33 +0400 (RET) Date: Fri, 15 Nov 2013 17:06:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [RFA/Ada(v2) 1/3] Add command to list Ada exceptions Message-ID: <20131115164533.GX3481@adacore.com> References: <1383912219-13012-1-git-send-email-brobecker@adacore.com> <1383912219-13012-2-git-send-email-brobecker@adacore.com> <87r4akz2n6.fsf@fleche.redhat.com> <20131113172135.GL3481@adacore.com> <20131115063915.GU3481@adacore.com> <877gc9vfyv.fsf@fleche.redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="GLp9dJVi+aaipsRk" Content-Disposition: inline In-Reply-To: <877gc9vfyv.fsf@fleche.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2013-11/txt/msg00422.txt.bz2 --GLp9dJVi+aaipsRk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 1512 > Joel> * gdb.ada/info_exc.exp: Start inferior before starting > Joel> the "info exceptions" tests. > Joel> * gdb.ada/mi_exc_info.exp: Start inferior before starting > Joel> the "-info-ada-exceptions" tests. > > Thanks Joel. This still fails, but in a new way, see appended. Humpf :-(. At least that's progress. This one is pretty easy to understand: Because you have debugging info for *all* runtime units, "info exceptions" gets to list them as well. The output you're getting is legit, so we have to accept it. That's a bit unfortunate, as this forces us to introduce wildcards in the expected output. Oh well... I've pushed the patch you tested, and then pushed also the attached patch. gdb/testsuite/ChangeLog: * gdb.ada/info_exc.exp: Allow other global exceptions to be listed in the output of "info exceptions". * gdb.ada/mi_exc_info.exp: Allow other global exceptions to be listed in the output of "-info-ada-exceptions". I did not test it on Fedora, since I haven't installed much on the VM I just created. But I tested on my x86_64-linux laptop, by reproducing another form of the same problem, involving the use of "gnatmake -f -a -g" instead of plain "gnatmake -g" to build the program. The added options force the GNAT runtime to be recompiled, thus putting me in the same situation as you. The testsuite passes for me in both situations (no debug info, with debug info). Hopefully that'll solve your issue as well. -- Joel --GLp9dJVi+aaipsRk Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-gdb.ada-info_exc.exp-mi_exc_info.exp-handle-runtimes.patch" Content-length: 2849 >From 2d4bfc30088a64073d5c73d3b1afa7601a826763 Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Fri, 15 Nov 2013 20:34:09 +0400 Subject: [PATCH] gdb.ada/info_exc.exp,mi_exc_info.exp: handle runtimes with full debug info. If the runtime has full debug info, then the non-standard exceptions declared in the GNAT runtime will appear in the list of exceptions printed by GDB ("info exceptions" or "-info-ada-exceptions"). This is valid output, so this patch allows for it. gdb/testsuite/ChangeLog: * gdb.ada/info_exc.exp: Allow other global exceptions to be listed in the output of "info exceptions". * gdb.ada/mi_exc_info.exp: Allow other global exceptions to be listed in the output of "-info-ada-exceptions". --- gdb/testsuite/gdb.ada/info_exc.exp | 4 +++- gdb/testsuite/gdb.ada/mi_exc_info.exp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.ada/info_exc.exp b/gdb/testsuite/gdb.ada/info_exc.exp index 9637bce..9210029 100644 --- a/gdb/testsuite/gdb.ada/info_exc.exp +++ b/gdb/testsuite/gdb.ada/info_exc.exp @@ -45,7 +45,9 @@ gdb_test "info exceptions" \ "program_error: $hex" \ "storage_error: $hex" \ "tasking_error: $hex" \ - "const.aint_global_e: $hex"] + ".*" \ + "const.aint_global_e: $hex" \ + ".*"] gdb_test "info exceptions task" \ [multi_line "All Ada exceptions matching regular expression \"task\":" \ diff --git a/gdb/testsuite/gdb.ada/mi_exc_info.exp b/gdb/testsuite/gdb.ada/mi_exc_info.exp index 8325e90..14a9e4d 100644 --- a/gdb/testsuite/gdb.ada/mi_exc_info.exp +++ b/gdb/testsuite/gdb.ada/mi_exc_info.exp @@ -39,7 +39,7 @@ mi_gdb_reinitialize_dir $srcdir/$subdir mi_gdb_load ${binfile} mi_gdb_test "-info-ada-exceptions" \ - "\\^done,ada-exceptions={nr_rows=\"5\",nr_cols=\"2\",hdr=\\\[{width=\"1\",alignment=\"-1\",col_name=\"name\",colhdr=\"Name\"},{width=\"1\",alignment=\"-1\",col_name=\"address\",colhdr=\"Address\"}\\\],body=\\\[{name=\"constraint_error\",address=\"$hex\"},{name=\"program_error\",address=\"$hex\"},{name=\"storage_error\",address=\"$hex\"},{name=\"tasking_error\",address=\"$hex\"},{name=\"const.aint_global_e\",address=\"$hex\"}\\\]}" \ + "\\^done,ada-exceptions={nr_rows=\"$decimal\",nr_cols=\"2\",hdr=\\\[{width=\"1\",alignment=\"-1\",col_name=\"name\",colhdr=\"Name\"},{width=\"1\",alignment=\"-1\",col_name=\"address\",colhdr=\"Address\"}\\\],body=\\\[{name=\"constraint_error\",address=\"$hex\"},{name=\"program_error\",address=\"$hex\"},{name=\"storage_error\",address=\"$hex\"},{name=\"tasking_error\",address=\"$hex\"},.*{name=\"const.aint_global_e\",address=\"$hex\"}.*\\\]}" \ "-info-ada-exceptions" mi_gdb_test "-info-ada-exceptions task" \ -- 1.8.1.2 --GLp9dJVi+aaipsRk--