From patchwork Wed Feb 13 14:03:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Hayward X-Patchwork-Id: 31439 Received: (qmail 31123 invoked by alias); 13 Feb 2019 14:03:18 -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 31112 invoked by uid 89); 13 Feb 2019 14:03:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=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.2 spammy= X-HELO: EUR01-VE1-obe.outbound.protection.outlook.com Received: from mail-eopbgr140051.outbound.protection.outlook.com (HELO EUR01-VE1-obe.outbound.protection.outlook.com) (40.107.14.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 13 Feb 2019 14:03:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rIRPIYeNpMQ95i/1b0zYuR4l/3I/jp6f8QD/sKKsHa0=; b=NhDe3Qf0+4B0deWmmt5S1e0IDJi1mFA5eTKF4DIgqZ9s7VcwWvLZ0VdabW0kaKgyisvccJ1ZJU9oAa+/45TBeRLKvmlF33e2tjivadC+E8xeOK+EUTiJ6fleoVirh3Vs1smz5w6qhrNvm/PLrTxl3pQ//9u29RSgzTOkjD0SOuU= Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com (10.172.227.22) by DB6PR0802MB2536.eurprd08.prod.outlook.com (10.172.252.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1601.22; Wed, 13 Feb 2019 14:03:08 +0000 Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::acd7:a958:2aaa:562e]) by DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::acd7:a958:2aaa:562e%5]) with mapi id 15.20.1601.023; Wed, 13 Feb 2019 14:03:08 +0000 From: Alan Hayward To: "gdb-patches@sourceware.org" CC: nd , Alan Hayward Subject: [PATCH] AArch64: Add default reggroups Date: Wed, 13 Feb 2019 14:03:08 +0000 Message-ID: <20190213140303.8848-1-alan.hayward@arm.com> authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 MIME-Version: 1.0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-IsSubscribed: yes Aarch64 does not define any reggroups. This causes "maintenance print reggroups" to dump the default set (which is ok). However, if a new group is added via an xml file, then this now becomes the only group. Fixes gdb.xml/tdesc-regs.exp on AArch64. gdb/ChangeLog: 2019-02-13 Alan Hayward * aarch64-tdep.c (aarch64_add_reggroups): New function (aarch64_gdbarch_init): Call aarch64_add_reggroups. --- gdb/aarch64-tdep.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c index bc928e14e9..f85539313f 100644 --- a/gdb/aarch64-tdep.c +++ b/gdb/aarch64-tdep.c @@ -2955,6 +2955,19 @@ aarch64_get_tdesc_vq (const struct target_desc *tdesc) return sve_vq_from_vl (vl); } +/* Add all the expected register sets into GDBARCH. */ + +static void +aarch64_add_reggroups (struct gdbarch *gdbarch) +{ + reggroup_add (gdbarch, general_reggroup); + reggroup_add (gdbarch, float_reggroup); + reggroup_add (gdbarch, system_reggroup); + reggroup_add (gdbarch, vector_reggroup); + reggroup_add (gdbarch, all_reggroup); + reggroup_add (gdbarch, save_reggroup); + reggroup_add (gdbarch, restore_reggroup); +} /* Initialize the current architecture based on INFO. If possible, re-use an architecture from ARCHES, which is a list of @@ -3137,6 +3150,9 @@ aarch64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Virtual tables. */ set_gdbarch_vbit_in_delta (gdbarch, 1); + /* Register architecture. */ + aarch64_add_reggroups (gdbarch); + /* Hook in the ABI-specific overrides, if they have been registered. */ info.target_desc = tdesc; info.tdesc_data = tdesc_data;