From patchwork Fri Jul 5 09:45:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Hayward X-Patchwork-Id: 33600 Received: (qmail 128552 invoked by alias); 5 Jul 2019 09:45:56 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 128509 invoked by uid 89); 5 Jul 2019 09:45:54 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-23.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=HAccept-Language:en-GB X-HELO: EUR04-VI1-obe.outbound.protection.outlook.com Received: from mail-eopbgr80084.outbound.protection.outlook.com (HELO EUR04-VI1-obe.outbound.protection.outlook.com) (40.107.8.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 05 Jul 2019 09:45:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zrr/nR3yfrHO7U+y9OT2R59R9W3qZtHtLJ8FVuKZb2o=; b=a+gxbUEHkP+WIr0ExeUnADu0wWJrsxSfqxMdkPgVXRPpb4b/q3hO4IYvbo1RLhQ0jKb1qa+yDtJVm0q0jcAQxEJkjwjgFokqA07LDBwUrgBFAi8/AiT6HLbH741z/ukuxePLM3Rz+mzEEisAw9ITg/HKk6r3ivcHmnl3inD0jXM= Received: from DB6PR0801CA0048.eurprd08.prod.outlook.com (2603:10a6:4:2b::16) by DB6PR0802MB2597.eurprd08.prod.outlook.com (2603:10a6:4:99::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2052.18; Fri, 5 Jul 2019 09:45:45 +0000 Received: from VE1EUR03FT045.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::201) by DB6PR0801CA0048.outlook.office365.com (2603:10a6:4:2b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2052.18 via Frontend Transport; Fri, 5 Jul 2019 09:45:45 +0000 Authentication-Results: spf=temperror (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; sourceware.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; sourceware.org; dmarc=temperror action=none header.from=arm.com; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT045.mail.protection.outlook.com (10.152.19.51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2052.18 via Frontend Transport; Fri, 5 Jul 2019 09:45:43 +0000 Received: ("Tessian outbound a713653e08e1:v23"); Fri, 05 Jul 2019 09:45:43 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 4e90c55d3eca7664 X-CR-MTA-TID: 64aa7808 Received: from 7ecfcbd9f912.12 (cr-mta-lb-1.cr-mta-net [104.47.13.53]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id AE249032-59FE-4E3F-A1C1-164131ADD754.1; Fri, 05 Jul 2019 09:45:38 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04lp2053.outbound.protection.outlook.com [104.47.13.53]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 7ecfcbd9f912.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384); Fri, 05 Jul 2019 09:45:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zrr/nR3yfrHO7U+y9OT2R59R9W3qZtHtLJ8FVuKZb2o=; b=a+gxbUEHkP+WIr0ExeUnADu0wWJrsxSfqxMdkPgVXRPpb4b/q3hO4IYvbo1RLhQ0jKb1qa+yDtJVm0q0jcAQxEJkjwjgFokqA07LDBwUrgBFAi8/AiT6HLbH741z/ukuxePLM3Rz+mzEEisAw9ITg/HKk6r3ivcHmnl3inD0jXM= Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com (10.172.227.22) by DB6PR0802MB2472.eurprd08.prod.outlook.com (10.172.251.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2032.20; Fri, 5 Jul 2019 09:45:35 +0000 Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::259b:8edf:fb65:2760]) by DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::259b:8edf:fb65:2760%8]) with mapi id 15.20.2052.010; Fri, 5 Jul 2019 09:45:35 +0000 From: Alan Hayward To: "gdb-patches@sourceware.org" CC: nd , Alan Hayward Subject: [PATCH 5/7] Arm: Add xml unit tests Date: Fri, 5 Jul 2019 09:45:35 +0000 Message-ID: <20190705094525.51536-6-alan.hayward@arm.com> References: <20190705094525.51536-1-alan.hayward@arm.com> In-Reply-To: <20190705094525.51536-1-alan.hayward@arm.com> Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; X-Microsoft-Antispam-Untrusted: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:DB6PR0802MB2472; x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:6430;OLM:6430; X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(376002)(396003)(366004)(346002)(39860400002)(136003)(54534003)(189003)(199004)(68736007)(73956011)(44832011)(5660300002)(66946007)(66446008)(305945005)(66556008)(478600001)(6116002)(6916009)(25786009)(446003)(2906002)(3846002)(2616005)(50226002)(476003)(486006)(64756008)(66476007)(7736002)(2351001)(8936002)(86362001)(36756003)(53936002)(102836004)(4326008)(52116002)(81156014)(26005)(256004)(14454004)(76176011)(6512007)(6436002)(186003)(6486002)(81166006)(8676002)(1076003)(2501003)(71190400001)(316002)(11346002)(99286004)(54906003)(66066001)(5640700003)(6506007)(386003)(71200400001)(72206003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0802MB2472; H:DB6PR0802MB2133.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: I6M/hd96IT7dT3sUkM1Jz26q0oX5+fzvdCtJcNuMeXctVLFyIV89epqjt7ko9SGIaxpHE72mt1snosQCb4I8zIoFHpOWwqxpgym5rI3MI5U5ad3kgPpIiL9KQoY3sAZQXpqqLyV6aO/TwwbXGYeBQ3e+uVs1DOxqLrnb7H9qz0qzCCCcLuENobRokr+hvkSfVIAh0QE9d5ApOWlOKAQ+N1uo6aAorp+oDSZnMMvZEQ4HIzqkn/8fYvRz8F/eD3zSTHaBB8QeXpFfJctima/8E5VRPTmkiisoBjKH/U34Zovs9wByXu9bT9CuZ8lv8F09PeajQTCAraXOdEv9Fo68PxrNR0deVLcPMU//HfAvz2kri81yh+sdQZUo1avmhzBZN32I4zXaxhf9ux2Hb5Ic2W2INqxc0FVcajmVBxlNqXU= MIME-Version: 1.0 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; Return-Path: Alan.Hayward@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT045.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 4eb92cd4-3914-4b48-661d-08d7012d8757 X-IsSubscribed: yes Use the record_xml_tdesc tests to prove the new target descriptions are identical to the previous xml file ones. This is tested as part of gdb.gdb/unittest.exp. gdb/ChangeLog: 2019-07-05 Alan Hayward * arm-tdep.c (_initialize_arm_tdep): Add xml regression tests. --- gdb/arm-tdep.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 91a4a785ea..ea8b22d652 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -63,6 +63,7 @@ #if GDB_SELF_TEST #include "common/selftest.h" +#include "aarch32-tdep.h" #endif static int arm_debug; @@ -9575,6 +9576,23 @@ vfp - VFP co-processor."), #if GDB_SELF_TEST selftests::register_test ("arm-record", selftests::arm_record_test); + + const target_desc *tdesc; + + tdesc = arm_read_description (ARM_FP_TYPE_VFPV2); + selftests::record_xml_tdesc ("arm/arm-with-vfpv2.xml", tdesc); + tdesc = arm_read_description (ARM_FP_TYPE_VFPV3); + selftests::record_xml_tdesc ("arm/arm-with-vfpv3.xml",tdesc); + tdesc = arm_read_description (ARM_FP_TYPE_IWMMXT); + selftests::record_xml_tdesc ("arm/arm-with-iwmmxt.xml", tdesc); + tdesc = arm_create_mprofile_target_description (ARM_M_TYPE_M_PROFILE); + selftests::record_xml_tdesc ("arm/arm-with-m.xml", tdesc); + tdesc = arm_create_mprofile_target_description (ARM_M_TYPE_VFP_D16); + selftests::record_xml_tdesc ("arm/arm-with-m-vfp-d16.xml", tdesc); + tdesc = arm_create_mprofile_target_description (ARM_M_TYPE_WITH_FPA); + selftests::record_xml_tdesc ("arm/arm-with-m-fpa-layout.xml", tdesc); + tdesc = aarch32_read_description (); + selftests::record_xml_tdesc ("arm/arm-with-neon.xml", tdesc); #endif }