From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10151 invoked by alias); 15 Nov 2013 17:57:37 -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 10125 invoked by uid 89); 15 Nov 2013 17:57:37 -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 17:57:35 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id C148D116544; Fri, 15 Nov 2013 12:57:59 -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 GtrgBOICmmbv; Fri, 15 Nov 2013 12:57:59 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 4B06011652A; Fri, 15 Nov 2013 12:57:59 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id DFB88E1862; Fri, 15 Nov 2013 21:57:22 +0400 (RET) Date: Fri, 15 Nov 2013 18:01: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: <20131115175722.GY3481@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> <20131115164533.GX3481@adacore.com> <87ppq1tx0q.fsf@fleche.redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="GUPx2O/K0ibUojHx" Content-Disposition: inline In-Reply-To: <87ppq1tx0q.fsf@fleche.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2013-11/txt/msg00425.txt.bz2 --GUPx2O/K0ibUojHx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 1391 > Almost there :) (noisy sigh...). Sorry about this mess, Tom. > info exceptions global > All Ada exceptions matching regular expression "global": > const.aint_global_e: 0x608120 > system.global_locks.lock_error: 0x7ffff7fcdfe0 > (gdb) FAIL: gdb.ada/info_exc.exp: info exceptions global > > I'm not sure if this was there before and I missed it, or if it is new. It was probably there before. I didn't see it on my machine, because not all runtime units get re-built with "-a -f", only the ones needed by the program. Can you try the attached patch? If it wasn't so late here, I'd test it myself on the fedora machine - if it still fails, I promise, I will get myself setup on fedora. gdb/testsuite/ChangeLog: * info_exc/const.ads (Aint_Global_GDB_E): Renames Aint_Global_E. * info_exc/foo.adb: Adjust to new exception name. * info_exc.exp: Adjust after exception renaming in const.ads. Update "info exception global" test to test "info exceptions global_gdb" instead. * mi_exc_info/const.ads (Aint_Global_GDB_E): Renames Aint_Global_E. * mi_exc_info/foo.adb (Adjust to new exception name. * mi_exc_info.exp: Adjust after exception renaming in const.ads. Update "-info-ada-exceptions global" test to test "-info-ada-exceptions global_gdb" instead. Tested on x86_64-linux. -- Joel --GUPx2O/K0ibUojHx Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-gdb.ada-info_exc.exp-mi_exc_info.exp-Use-more-unique.patch" Content-length: 7560 >From 5aa2ad37e69981d120d594afbaba88c3810433f5 Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Fri, 15 Nov 2013 21:46:34 +0400 Subject: [PATCH] gdb.ada/info_exc.exp,mi_exc_info.exp: Use more unique exception name. In the case where the GNAT runtime was built with full debugging info, several of the exceptions defined there might have a name contain the word "global". To make this less likely, this patch renames the exception name, replacing "Global" by "Global_GDB". It still keeps the exeption name relatively short, while it is unlikely that the GNAT runtime have an exception whose name explicitly mentions GDB, and even less likely that it contains "Global_GDB". gdb/testsuite/ChangeLog: * info_exc/const.ads (Aint_Global_GDB_E): Renames Aint_Global_E. * info_exc/foo.adb: Adjust to new exception name. * info_exc.exp: Adjust after exception renaming in const.ads. Update "info exception global" test to test "info exceptions global_gdb" instead. * mi_exc_info/const.ads (Aint_Global_GDB_E): Renames Aint_Global_E. * mi_exc_info/foo.adb (Adjust to new exception name. * mi_exc_info.exp: Adjust after exception renaming in const.ads. Update "-info-ada-exceptions global" test to test "-info-ada-exceptions global_gdb" instead. --- gdb/testsuite/gdb.ada/info_exc.exp | 10 +++++----- gdb/testsuite/gdb.ada/info_exc/const.ads | 2 +- gdb/testsuite/gdb.ada/info_exc/foo.adb | 2 +- gdb/testsuite/gdb.ada/mi_exc_info.exp | 10 +++++----- gdb/testsuite/gdb.ada/mi_exc_info/const.ads | 2 +- gdb/testsuite/gdb.ada/mi_exc_info/foo.adb | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/gdb/testsuite/gdb.ada/info_exc.exp b/gdb/testsuite/gdb.ada/info_exc.exp index 9210029..087ae32 100644 --- a/gdb/testsuite/gdb.ada/info_exc.exp +++ b/gdb/testsuite/gdb.ada/info_exc.exp @@ -46,19 +46,19 @@ gdb_test "info exceptions" \ "storage_error: $hex" \ "tasking_error: $hex" \ ".*" \ - "const.aint_global_e: $hex" \ + "const.aint_global_gdb_e: $hex" \ ".*"] gdb_test "info exceptions task" \ [multi_line "All Ada exceptions matching regular expression \"task\":" \ "tasking_error: $hex"] -gdb_test "info exceptions global" \ - [multi_line "All Ada exceptions matching regular expression \"global\":" \ - "const.aint_global_e: $hex"] +gdb_test "info exceptions global_gdb" \ + [multi_line "All Ada exceptions matching regular expression \"global_gdb\":" \ + "const.aint_global_gdb_e: $hex"] gdb_test "info exceptions const.aint" \ [multi_line "All Ada exceptions matching regular expression \"const\\.aint\":" \ "constraint_error: $hex" \ - "const.aint_global_e: $hex"] + "const.aint_global_gdb_e: $hex"] diff --git a/gdb/testsuite/gdb.ada/info_exc/const.ads b/gdb/testsuite/gdb.ada/info_exc/const.ads index 753241e..20a8424 100644 --- a/gdb/testsuite/gdb.ada/info_exc/const.ads +++ b/gdb/testsuite/gdb.ada/info_exc/const.ads @@ -14,5 +14,5 @@ -- along with this program. If not, see . package Const is - Aint_Global_E : exception; + Aint_Global_GDB_E : exception; end Const; diff --git a/gdb/testsuite/gdb.ada/info_exc/foo.adb b/gdb/testsuite/gdb.ada/info_exc/foo.adb index e047db2..f00a09e 100644 --- a/gdb/testsuite/gdb.ada/info_exc/foo.adb +++ b/gdb/testsuite/gdb.ada/info_exc/foo.adb @@ -16,5 +16,5 @@ with Const; use Const; procedure Foo is begin - raise Aint_Global_E; + raise Aint_Global_GDB_E; end Foo; diff --git a/gdb/testsuite/gdb.ada/mi_exc_info.exp b/gdb/testsuite/gdb.ada/mi_exc_info.exp index 14a9e4d..6ca2328 100644 --- a/gdb/testsuite/gdb.ada/mi_exc_info.exp +++ b/gdb/testsuite/gdb.ada/mi_exc_info.exp @@ -39,18 +39,18 @@ mi_gdb_reinitialize_dir $srcdir/$subdir mi_gdb_load ${binfile} mi_gdb_test "-info-ada-exceptions" \ - "\\^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\"}.*\\\]}" \ + "\\^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_gdb_e\",address=\"$hex\"}.*\\\]}" \ "-info-ada-exceptions" mi_gdb_test "-info-ada-exceptions task" \ "\\^done,ada-exceptions={nr_rows=\"1\",nr_cols=\"2\",hdr=\\\[{width=\"1\",alignment=\"-1\",col_name=\"name\",colhdr=\"Name\"},{width=\"1\",alignment=\"-1\",col_name=\"address\",colhdr=\"Address\"}\\\],body=\\\[{name=\"tasking_error\",address=\"$hex\"}\\\]}" \ "-info-ada-exceptions task" -mi_gdb_test "-info-ada-exceptions global" \ - "\\^done,ada-exceptions={nr_rows=\"1\",nr_cols=\"2\",hdr=\\\[{width=\"1\",alignment=\"-1\",col_name=\"name\",colhdr=\"Name\"},{width=\"1\",alignment=\"-1\",col_name=\"address\",colhdr=\"Address\"}\\\],body=\\\[{name=\"const.aint_global_e\",address=\"$hex\"}\\\]}" \ - "-info-ada-exceptions global" +mi_gdb_test "-info-ada-exceptions global_gdb" \ + "\\^done,ada-exceptions={nr_rows=\"1\",nr_cols=\"2\",hdr=\\\[{width=\"1\",alignment=\"-1\",col_name=\"name\",colhdr=\"Name\"},{width=\"1\",alignment=\"-1\",col_name=\"address\",colhdr=\"Address\"}\\\],body=\\\[{name=\"const.aint_global_gdb_e\",address=\"$hex\"}\\\]}" \ + "-info-ada-exceptions global_gdb" mi_gdb_test "-info-ada-exceptions const.aint" \ - "\\^done,ada-exceptions={nr_rows=\"2\",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=\"const.aint_global_e\",address=\"$hex\"}\\\]}" \ + "\\^done,ada-exceptions={nr_rows=\"2\",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=\"const.aint_global_gdb_e\",address=\"$hex\"}\\\]}" \ "-info-ada-exceptions const.aint" diff --git a/gdb/testsuite/gdb.ada/mi_exc_info/const.ads b/gdb/testsuite/gdb.ada/mi_exc_info/const.ads index 753241e..20a8424 100644 --- a/gdb/testsuite/gdb.ada/mi_exc_info/const.ads +++ b/gdb/testsuite/gdb.ada/mi_exc_info/const.ads @@ -14,5 +14,5 @@ -- along with this program. If not, see . package Const is - Aint_Global_E : exception; + Aint_Global_GDB_E : exception; end Const; diff --git a/gdb/testsuite/gdb.ada/mi_exc_info/foo.adb b/gdb/testsuite/gdb.ada/mi_exc_info/foo.adb index e047db2..f00a09e 100644 --- a/gdb/testsuite/gdb.ada/mi_exc_info/foo.adb +++ b/gdb/testsuite/gdb.ada/mi_exc_info/foo.adb @@ -16,5 +16,5 @@ with Const; use Const; procedure Foo is begin - raise Aint_Global_E; + raise Aint_Global_GDB_E; end Foo; -- 1.8.1.2 --GUPx2O/K0ibUojHx--