From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id 68F913858D35 for ; Tue, 16 Jun 2020 20:04:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 68F913858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Sandra_Loosemore@mentor.com IronPort-SDR: sOJuCYr1y7qqhG9gH8dIsaksigoMrvgKOSeozy9tet7KVE+Ixh2QX0PRFL82F4VNeYLqIuPhSI 8wpNwKdtRiDsqU9xQlLWBfmpT8Deo7Z9p6nTVHr80atB2KgEf5XDvqez7tL7iF5mcdhqJeAH/u BJL/SfBtQ3iiVpNcfbuvnmsHbkyvhj5mQc2VXIWHVRsuOgwtVj484UQ6BZSPjZlSI2fu+JkNDi 3+Ve0QBtHu0RDx4n0kUYRdokAjZ0cpW5pA6WltL3n1hYdkq9tlS5WOjyfwztzl8kDSpn6Re7x9 UkU= X-IronPort-AV: E=Sophos;i="5.73,519,1583222400"; d="scan'208";a="49869149" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 16 Jun 2020 12:04:58 -0800 IronPort-SDR: 1g+9PmMh/TNpqP8UhUt26yoLuZXXBV5yC5pLUiq9cBplI0aIEvkzugUEylssAEfkSFt1T5Cjhu MtocWcu5CGMY6D074VCyMSBilmAPdI+YyR9tqAW+GKgEubsHErDozLtn7tTwNKT9RVpnyOvqsY Steb04lbyCi1PwewWkHa3svCUF+5HblG4KPlSxEeNYFinvW4ns3cTVacD49sYgZGhZ3ETG4d7m vWppO80RG/a3r9mvHiH68fUC5b8ILQIpX4F4JSIwJ9SVYDKkvZUOGF4HasY4M+qhEpGY8Uzcyn Dyk= To: "gdb-patches@sourceware.org" From: Sandra Loosemore Subject: [patch] gdb/testsuite: fixes for gdb.xml/tdesc-regs.exp Message-ID: <71c00a14-a956-a087-8b9a-9b453194d4f2@codesourcery.com> Date: Tue, 16 Jun 2020 14:04:51 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------01F9050A1EAA4482EE53DA61" Content-Language: en-US X-ClientProxiedBy: svr-orw-mbx-04.mgc.mentorg.com (147.34.90.204) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2020 20:05:01 -0000 --------------01F9050A1EAA4482EE53DA61 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit We've had this patch to fix various failures in gdb.xml/tdesc-regs.exp in our local tree for a few years now and would like to get it committed upstream. It fixes these problems: - It's using the wrong source pathname when trying to copy the .xml file to remote host. - We've seen at least one case where the type of the 32-bit register prints as "int32_t" rather than "int|long" etc -- I think this was on an ilp64 target. - This test expects to see a register group named "general" but not all targets provide one. OK to commit? -Sandra --------------01F9050A1EAA4482EE53DA61 Content-Type: text/x-patch; charset="UTF-8"; name="tdesc-regs.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="tdesc-regs.patch" commit d32235b2037694e2586f83b6c3a5bc76fd1241ab Author: Sandra Loosemore Date: Tue Jun 16 12:48:42 2020 -0700 gdb/testsuite: fixes for gdb.xml/tdesc-regs.exp 2020-06-16 Sandra Loosemore Hafiz Abid Qadeer gdb/testsuite/ * gdb.xml/tdesc-regs.exp (load_description): Correct pathname of file sent to remote host. (top level): Allow int32_t as type of 32-bit register. Don't require a register group named "general". diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index d2ed9db..4b8c7b5 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2020-06-16 Sandra Loosemore + Hafiz Abid Qadeer + + * gdb.xml/tdesc-regs.exp (load_description): Correct pathname of + file sent to remote host. + (top level): Allow int32_t as type of 32-bit register. Don't + require a register group named "general". + 2020-06-16 Gary Benson * gdb.python/py-nested-maps.c (create_map): Add missing return diff --git a/gdb/testsuite/gdb.xml/tdesc-regs.exp b/gdb/testsuite/gdb.xml/tdesc-regs.exp index bb04420..b1e4525 100644 --- a/gdb/testsuite/gdb.xml/tdesc-regs.exp +++ b/gdb/testsuite/gdb.xml/tdesc-regs.exp @@ -145,7 +145,7 @@ proc load_description { file errmsg xml_file } { close $ofd if {[is_remote host]} { - set regs_file [remote_download host "$subdir/$xml_file" $xml_file] + set regs_file [remote_download host "$regs_file" $xml_file] } # Anchor the test output, so that error messages are detected. @@ -165,7 +165,7 @@ if {![is_remote host]} { } load_description "extra-regs.xml" "" "test-extra-regs.xml" -gdb_test "ptype \$extrareg" "type = (int|long|long long)" +gdb_test "ptype \$extrareg" "type = (int32_t|int|long|long long)" gdb_test "ptype \$uintreg" "type = uint32_t" gdb_test "ptype \$vecreg" "type = int8_t __attribute__ \\(\\(vector_size\\(4\\)\\)\\)" gdb_test "ptype \$unionreg" \ @@ -180,9 +180,9 @@ gdb_test "ptype \$flags" \ "type = flag flags {\r\n *bool X @0;\r\n *uint32_t Y @2;\r\n}" gdb_test "ptype \$mixed_flags" \ "type = flag mixed_flags {\r\n *bool A @0;\r\n *uint32_t B @1-3;\r\n *bool C @4;\r\n *uint32_t D @5;\r\n *uint32_t @6-7;\r\n *enum Z_values {yes = 1, no = 0, maybe = 2, so} Z @8-9;\r\n}" -# Reggroups should have at least general and the extra foo group +# Reggroups should have at least the extra foo group gdb_test "maintenance print reggroups" \ - " Group\[ \t\]+Type\[ \t\]+\r\n.* general\[ \t\]+user\[ \t\]+\r\n.* foo\[ \t\]+user\[ \t\]+" + " Group\[ \t\]+Type\[ \t\]+\r\n.* foo\[ \t\]+user\[ \t\]+" with_test_prefix "core-only.xml" { load_description "core-only.xml" "" "test-regs.xml" --------------01F9050A1EAA4482EE53DA61--