gdb.ada/info_exc.exp,mi_exc_info.exp: Use more unique exception name.
authorJoel Brobecker <brobecker@adacore.com>
Fri, 15 Nov 2013 17:46:34 +0000 (21:46 +0400)
committerJoel Brobecker <brobecker@adacore.com>
Sat, 16 Nov 2013 02:45:57 +0000 (06:45 +0400)
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 has 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/ChangeLog
gdb/testsuite/gdb.ada/info_exc.exp
gdb/testsuite/gdb.ada/info_exc/const.ads
gdb/testsuite/gdb.ada/info_exc/foo.adb
gdb/testsuite/gdb.ada/mi_exc_info.exp
gdb/testsuite/gdb.ada/mi_exc_info/const.ads
gdb/testsuite/gdb.ada/mi_exc_info/foo.adb

index e592cec018a528077e6c9317be40cb4e54604b54..3aa68e3847f37e08863b889adb6eaf31084e96ec 100644 (file)
@@ -1,3 +1,17 @@
+2013-11-16  Joel Brobecker  <brobecker@adacore.com>
+
+       * 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.
+
 2013-11-15  Luis Machado  <lgustavo@codesourcery.com>
 
        * lib/mi-support.exp (mi_gdb_test): Expect different formats
index 921002920176b480390b70ac4715fcd19205c456..087ae320ad0750699372107eaacabf6aa7953ff2 100644 (file)
@@ -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"]
 
index 753241eaf02e91d54defcf5cade69c1e0d3284ea..20a8424187017f21f0ea858c2f8eee613b8a9602 100644 (file)
@@ -14,5 +14,5 @@
 --  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 package Const is
-   Aint_Global_E : exception;
+   Aint_Global_GDB_E : exception;
 end Const;
index e047db2d85750523d86fa963331d4ae5fabeb07f..f00a09e3ce22b72fd2fa2d0c17bcb5d6a11b95c1 100644 (file)
@@ -16,5 +16,5 @@
 with Const; use Const;
 procedure Foo is
 begin
-   raise Aint_Global_E;
+   raise Aint_Global_GDB_E;
 end Foo;
index 14a9e4de761c7759e1b256ab38dfdf6ea9fbf66c..6ca2328d60bbb187e87fefd398bbe3d1fe1803df 100644 (file)
@@ -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"
 
index 753241eaf02e91d54defcf5cade69c1e0d3284ea..20a8424187017f21f0ea858c2f8eee613b8a9602 100644 (file)
@@ -14,5 +14,5 @@
 --  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 package Const is
-   Aint_Global_E : exception;
+   Aint_Global_GDB_E : exception;
 end Const;
index e047db2d85750523d86fa963331d4ae5fabeb07f..f00a09e3ce22b72fd2fa2d0c17bcb5d6a11b95c1 100644 (file)
@@ -16,5 +16,5 @@
 with Const; use Const;
 procedure Foo is
 begin
-   raise Aint_Global_E;
+   raise Aint_Global_GDB_E;
 end Foo;