From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 72243 invoked by alias); 22 Jan 2018 14:06:17 -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 72228 invoked by uid 89); 22 Jan 2018 14:06:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=complicating, H*f:sk:xaphXX4, H*f:s-PM, H*i:sk:xaphXX4 X-HELO: EUR01-VE1-obe.outbound.protection.outlook.com Received: from mail-ve1eur01on0056.outbound.protection.outlook.com (HELO EUR01-VE1-obe.outbound.protection.outlook.com) (104.47.1.56) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 22 Jan 2018 14:06:14 +0000 Received: from DB3PR08MB0106.eurprd08.prod.outlook.com (10.161.56.20) by DB3PR08MB0106.eurprd08.prod.outlook.com (10.161.56.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Mon, 22 Jan 2018 14:06:10 +0000 Received: from DB3PR08MB0106.eurprd08.prod.outlook.com ([fe80::958e:90c2:6108:af75]) by DB3PR08MB0106.eurprd08.prod.outlook.com ([fe80::958e:90c2:6108:af75%14]) with mapi id 15.20.0428.019; Mon, 22 Jan 2018 14:06:10 +0000 From: Alan Hayward To: Yao Qi CC: "gdb-patches@sourceware.org" , nd Subject: Re: [PATCH 1/6] : Commonise various target-descriptions.c functions Date: Mon, 22 Jan 2018 14:06:00 -0000 Message-ID: <74709F15-AABE-4539-867F-4DBD8835D6CC@arm.com> References: In-Reply-To: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DB3PR08MB0106;7:7N1Fg81STLqhoYxeFkk0/UzNXS73DRXioYMY2ZAXJ7ffNjFum7DYflgYAfwUsjHioxoXSS8FCBmttZQGYgtaqGKKRvHcceq0301dHi6uDFummtUGfzWLfmsM14oYgI8OaeG9YqKb7yz9As1Ie/jbsqsReFUCaDQxxK6CtHp6MqkT0MwdKbVX31PGLC8unuJzkjgg8ktKLCGCtpr8dzGScO+s5u9MP9c3gu4H5Tf2ElMWmeSxPReK7cq6jI2+BzHz x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 3db7d960-6935-40b6-1975-08d561a14a0a x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4604075)(3008032)(48565401081)(2017052603307)(7153060)(7193020);SRVR:DB3PR08MB0106; x-ms-traffictypediagnostic: DB3PR08MB0106: nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(180628864354917)(85827821059158); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040501)(2401047)(5005006)(8121501046)(3231023)(2400081)(944501161)(3002001)(10201501046)(93006095)(93001095)(6055026)(6041288)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:DB3PR08MB0106;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:DB3PR08MB0106; x-forefront-prvs: 0560A2214D x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(396003)(346002)(39380400002)(366004)(39860400002)(199004)(189003)(25786009)(6486002)(86362001)(3280700002)(5660300001)(6436002)(99286004)(105586002)(8936002)(478600001)(68736007)(305945005)(36756003)(97736004)(39060400002)(72206003)(2950100002)(6512007)(83716003)(6916009)(26005)(5250100002)(229853002)(53936002)(6116002)(54906003)(3846002)(8676002)(33656002)(6246003)(3660700001)(6506007)(14454004)(4743002)(66066001)(2906002)(82746002)(2900100001)(7736002)(102836004)(76176011)(81156014)(316002)(106356001)(53546011)(81166006)(1411001)(4326008);DIR:OUT;SFP:1101;SCL:1;SRVR:DB3PR08MB0106;H:DB3PR08MB0106.eurprd08.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: JPqq6ZFzvZvyCgVJSGd+OdAxbwEX+CCN+MCUkildx+G67ESp1+StQs2WgIAKZQaJfsv9RLBXpvkHLBWSGRdIkA== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3db7d960-6935-40b6-1975-08d561a14a0a X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Jan 2018 14:06:10.1504 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR08MB0106 X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg00442.txt.bz2 > On 19 Jan 2018, at 23:05, Yao Qi wrote: >=20 > On Tue, Jan 16, 2018 at 9:50 AM, Alan Hayward wrot= e: >> This patch simply moves functionality from target-descriptions.c >> to the common files arch/tdesc.c and arch/tdesc.h. >> No functionality is changed. >> This will allow usage by gdbserver. >> The "#ifndef GDBSERVER" around the functions in arch/tdesc.h will be rem= oved >> in the next patch. >>=20 >=20 > It is not right to move everything to arch/ and remove unused bits. GDB = now > is able to visit different tdesc_element, you want to do the same in > GDBserver, and share the code in arch/. However, tdesc stuff in GDB and > GDBserver are quite different, so the 1st step, IMO, is to make GDBserver > more similar to GDB. You can change each tdesc-related struct in each > patch, and refactor GDBserver bits. Then, only move *needed* structures > to arch/, and move one structure in one patch each, if possible. >=20 Did you want me to change the ordering of the patches in the series or did = you want me to reduce the amount of code that gets moved into arch/ ? When I wrote the whole patch series, I only moved across the functions I ne= eded from gdb to arch/. It turns out that I needed to move a lot of functions. W= ithout complicating the code, I think I need everything I moved into arch/ After I had finished writing my code, I looked at the ways of splitting it = up into a series. The simplest method was to put all the moving of functions into the= first patch. I agree that this makes the first patch a little odd to review. My r= easoning was to keep changes to the moved code separate from the moving. I can look at making a new version of 2/6 the first patch, and then follow = with smaller versions of this patch? The final change across the whole series wo= uld be the same.=20 Alan.