From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id 0FCB23952000; Thu, 17 Mar 2022 12:51:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0FCB23952000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Add another test for Ada Wide_Wide_String X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: c9178f285acf19e066be8367185d52837161b0a2 X-Git-Newrev: d32cbc04e31098d69a299f608424a5fcb69aae7a Message-Id: <20220317125140.0FCB23952000@sourceware.org> Date: Thu, 17 Mar 2022 12:51:40 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Mar 2022 12:51:40 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dd32cbc04e310= 98d69a299f608424a5fcb69aae7a commit d32cbc04e31098d69a299f608424a5fcb69aae7a Author: Tom Tromey Date: Wed Mar 16 09:50:17 2022 -0600 Add another test for Ada Wide_Wide_String =20 In an earlier patch, I had written that I wanted to add this test: =20 ptype Wide_Wide_String'("literal") =20 ... but that it failed with the distro GNAT. Further investigation showed that it could be made to work by adding a function using Wide_Wide_String to the program -- this caused the type to end up in the debug info. =20 This patch adds the test. I'm checking this in. Diff: --- gdb/testsuite/gdb.ada/widewide.exp | 3 +++ gdb/testsuite/gdb.ada/widewide/foo.adb | 3 ++- gdb/testsuite/gdb.ada/widewide/pck.adb | 10 ++++++++++ gdb/testsuite/gdb.ada/widewide/pck.ads | 2 ++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.ada/widewide.exp b/gdb/testsuite/gdb.ada/wid= ewide.exp index 2f14a0faee8..56c9e12abd2 100644 --- a/gdb/testsuite/gdb.ada/widewide.exp +++ b/gdb/testsuite/gdb.ada/widewide.exp @@ -59,3 +59,6 @@ gdb_test "print my_wws" " =3D \"bcllo\"" \ =20 gdb_test "print 'x' & my_ws" " =3D \"xwide\"" gdb_test "print my_ws & 'y'" " =3D \"widey\"" + +gdb_test "ptype wide_wide_string'(\"wws\")" \ + "array \\(1 \\.\\. 3\\) of wide_wide_character" diff --git a/gdb/testsuite/gdb.ada/widewide/foo.adb b/gdb/testsuite/gdb.ada= /widewide/foo.adb index d41734a485f..eda6ac54039 100644 --- a/gdb/testsuite/gdb.ada/widewide/foo.adb +++ b/gdb/testsuite/gdb.ada/widewide/foo.adb @@ -24,6 +24,7 @@ procedure Foo is begin Do_Nothing (Some_Easy'Address); -- START Do_Nothing (Some_Larger'Address); - Do_Nothing (My_Ws'Address); + Do_Nothing (My_Ws); + Do_Nothing (My_WWS); Do_Nothing (Some_Big'Address); end Foo; diff --git a/gdb/testsuite/gdb.ada/widewide/pck.adb b/gdb/testsuite/gdb.ada= /widewide/pck.adb index 6b9023beb67..f5ec5607a56 100644 --- a/gdb/testsuite/gdb.ada/widewide/pck.adb +++ b/gdb/testsuite/gdb.ada/widewide/pck.adb @@ -20,4 +20,14 @@ package body Pck is null; end Do_Nothing; =20 + procedure Do_Nothing (A : Wide_String) is + begin + null; + end Do_Nothing; + + procedure Do_Nothing (A : Wide_Wide_String) is + begin + null; + end Do_Nothing; + end Pck; diff --git a/gdb/testsuite/gdb.ada/widewide/pck.ads b/gdb/testsuite/gdb.ada= /widewide/pck.ads index e9316b09678..90c04f373f2 100644 --- a/gdb/testsuite/gdb.ada/widewide/pck.ads +++ b/gdb/testsuite/gdb.ada/widewide/pck.ads @@ -18,5 +18,7 @@ with System; package Pck is =20 procedure Do_Nothing (A : System.Address); + procedure Do_Nothing (A : Wide_String); + procedure Do_Nothing (A : Wide_Wide_String); =20 end Pck;