From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 128971 invoked by alias); 4 Jun 2018 13:13:14 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 126141 invoked by uid 89); 4 Jun 2018 13:13:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.0 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,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: EUR01-DB5-obe.outbound.protection.outlook.com Received: from mail-db5eur01on0073.outbound.protection.outlook.com (HELO EUR01-DB5-obe.outbound.protection.outlook.com) (104.47.2.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 04 Jun 2018 13:13:11 +0000 Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com (10.172.226.148) by DB6PR0802MB2470.eurprd08.prod.outlook.com (10.172.251.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.820.11; Mon, 4 Jun 2018 13:13:08 +0000 Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::d984:bdee:1856:c64]) by DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::d984:bdee:1856:c64%7]) with mapi id 15.20.0820.010; Mon, 4 Jun 2018 13:13:08 +0000 From: Alan Hayward To: Simon Marchi , Pedro Alves CC: "gdb-patches@sourceware.org" , nd Subject: Re: [PATCH 5/8] Add aarch64 psuedo help functions Date: Mon, 04 Jun 2018 13:13:00 -0000 Message-ID: References: <20180511105256.27388-1-alan.hayward@arm.com> <20180511105256.27388-6-alan.hayward@arm.com> <680d01bb-e6ec-3d9e-e8a8-29d7c7bbf530@ericsson.com> In-Reply-To: <680d01bb-e6ec-3d9e-e8a8-29d7c7bbf530@ericsson.com> authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DB6PR0802MB2470;7:3YoxUd+cNC+VZCDO5w1DeJK46mJF/EMuqcq7TszLVgA3wWvzcOgtDC9tjaGU9cKdxW0M9u3kUJIMhFWza9vCj49VlxU8GnMWDY1alO47/cQZRITKvfP7lDwN+pRiTcBmQa1xm12nt85cGolJ3oQfx8+qEUxl7R9WTwvX7l+KmNWB+0lGBLlxEoNemgXW1WY/0yB4UGyS8VzUi9q0J1WqIGOZOJkbjkuYNuFycP4voUTmMbEQFsBvNW7Wb9fVGFzq x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:DB6PR0802MB2470; x-ms-traffictypediagnostic: DB6PR0802MB2470: nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(37575265505322)(180628864354917); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3231254)(944501410)(52105095)(93006095)(93001095)(3002001)(6055026)(149027)(150027)(6041310)(20161123562045)(20161123560045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016);SRVR:DB6PR0802MB2470;BCL:0;PCL:0;RULEID:;SRVR:DB6PR0802MB2470; x-forefront-prvs: 069373DFB6 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39860400002)(39380400002)(396003)(346002)(366004)(376002)(199004)(189003)(97736004)(6116002)(83716003)(8936002)(2900100001)(6486002)(14454004)(76176011)(86362001)(478600001)(2616005)(3660700001)(72206003)(2906002)(6506007)(36756003)(105586002)(99286004)(4326008)(3280700002)(3846002)(305945005)(110136005)(316002)(57306001)(5250100002)(82746002)(446003)(11346002)(53936002)(8676002)(66066001)(81166006)(81156014)(6512007)(102836004)(7736002)(50226002)(186003)(106356001)(26005)(476003)(6436002)(53546011)(229853002)(54906003)(6246003)(5660300001)(486006)(25786009)(33656002)(68736007);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR0802MB2470;H:DB6PR0802MB2133.eurprd08.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: bxTKQpI+bxlYOorZ0NvbtMEb/Te5x15Fm0Y5nZJMkujGgpDyNFyB9kUPymHo14f67or4IqwwG2k3YhpwF+BOs//k+eL4GXqeePLiUX2r9TPdBDEG62yKDNaL28JRVVRbgGuROiyvo0ivBJD6D3u/N5CRPh3D0takJIFvfk79+JXgwjzno32DcuEj0NsfvLJc spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: e2a6c49a-fe0a-438a-8253-08d5ca1cea65 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: e2a6c49a-fe0a-438a-8253-08d5ca1cea65 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jun 2018 13:13:08.1617 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0802MB2470 X-IsSubscribed: yes X-SW-Source: 2018-06/txt/msg00057.txt.bz2 Pushed with minor changes as suggested below. > On 31 May 2018, at 13:06, Simon Marchi wrote: >=20 > psuedo -> pseudo in the title. Ok. >=20 > On 2018-05-11 06:52 AM, Alan Hayward wrote: >> Reduce code copy/paste by adding two helper functions for >> aarch64_pseudo_read_value and aarch64_pseudo_write >> The patch does not change any functionality. >>=20 >> 2018-05-11 Alan Hayward >>=20 >> * aarch64-tdep.c (aarch64_pseudo_read_value_2): New helper func. >> (aarch64_pseudo_write_2): Likewise. >> (aarch64_pseudo_read_value): Use helper. >> (aarch64_pseudo_write): Likewise. >> --- >> gdb/aarch64-tdep.c | 173 +++++++++++++++++------------------------------= ------ >> 1 file changed, 54 insertions(+), 119 deletions(-) >>=20 >> diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c >> index 7893579d58..003fefb3c9 100644 >> --- a/gdb/aarch64-tdep.c >> +++ b/gdb/aarch64-tdep.c >> @@ -2247,109 +2247,67 @@ aarch64_pseudo_register_reggroup_p (struct gdba= rch *gdbarch, int regnum, >> return group =3D=3D all_reggroup; >> } >>=20 >> +/* Inner version of aarch64_pseudo_read_value. */ >> + >> +static struct value * >> +aarch64_pseudo_read_value_2 (readable_regcache *regcache, int regnum_of= fset, >> + int regsize, struct value *result_value) >=20 > It's not a big deal, but in other GDB parts we actually often use the _1 = suffix > for the helper functions. Changed to aarch64_pseudo_read_value_1 and aarch64_pseudo_write_1. >=20 > But otherwise, LGTM. >=20 > Simon >=20 > On 31 May 2018, at 15:57, Pedro Alves wrote: >=20 > On 05/31/2018 01:06 PM, Simon Marchi wrote: >=20 >>> +/* Inner version of aarch64_pseudo_read_value. */ >>> + >>> +static struct value * >>> +aarch64_pseudo_read_value_2 (readable_regcache *regcache, int regnum_o= ffset, >>> + int regsize, struct value *result_value) >>=20 >> It's not a big deal, but in other GDB parts we actually often use the _1= suffix >> for the helper functions. >>=20 >=20 > Also, I'd think "Helper for aarch64_pseudo_read_value." would be clearer, > because "inner version" sounds a bit odd to me. Updated as suggested. Also updated write function too. >=20 >> But otherwise, LGTM. >=20 > To me too. >=20 > Thanks, > Pedro Alves Thanks! Alan.