From patchwork Tue Jan 16 14:18:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alan Hayward X-Patchwork-Id: 25416 Received: (qmail 9505 invoked by alias); 16 Jan 2018 14:18:14 -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 9017 invoked by uid 89); 16 Jan 2018 14:18: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, MIME_BASE64_BLANKS, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: EUR01-VE1-obe.outbound.protection.outlook.com Received: from mail-ve1eur01on0088.outbound.protection.outlook.com (HELO EUR01-VE1-obe.outbound.protection.outlook.com) (104.47.1.88) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 16 Jan 2018 14:18:11 +0000 Received: from AM3PR08MB0101.eurprd08.prod.outlook.com (10.160.211.19) by AM3PR08MB0103.eurprd08.prod.outlook.com (10.160.211.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Tue, 16 Jan 2018 14:18:07 +0000 Received: from AM3PR08MB0101.eurprd08.prod.outlook.com ([fe80::11:d2e2:886:ac9d]) by AM3PR08MB0101.eurprd08.prod.outlook.com ([fe80::11:d2e2:886:ac9d%17]) with mapi id 15.20.0407.012; Tue, 16 Jan 2018 14:18:07 +0000 From: Alan Hayward To: "gdb-patches@sourceware.org" CC: nd Subject: Re: [PATCH 1/6] : Commonise various target-descriptions.c functions Date: Tue, 16 Jan 2018 14:18:07 +0000 Message-ID: <5159CC81-6EF1-43DC-9C1D-DF85DC51A59D@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; AM3PR08MB0103; 7:EQT0+moKpVJq3oZosKgU1uvZ5tP3stTIgkct1FLyGzJeJpRmxJrNdhMwHvwS7Fbaa23X3ZHYR+pYQVnKkM9g5V6ijEhJFKjTzRXFUtgMn8wxyR++3sSqEgol0H1RWDR3XbRmV4Jc2ZpVW+Iah3Dn6wwN+1t5rb83XdmlOexRGpvETU9jEbboJv5eaIMy16D6UjRBqZ7V9ksyOtKT5Or7s6YhDQxTAlAl7cThGUIfxdzEgUowU5ViAufAvI+USIOV x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 14ccc07d-7bb6-4f5c-ef34-08d55cebf6f2 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:AM3PR08MB0103; x-ms-traffictypediagnostic: AM3PR08MB0103: nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(180628864354917); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(3231023)(944501161)(6055026)(6041268)(20161123562045)(20161123558120)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:AM3PR08MB0103; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:AM3PR08MB0103; x-forefront-prvs: 0554B1F54F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(376002)(396003)(366004)(39380400002)(346002)(24454002)(199004)(189003)(86362001)(305945005)(72206003)(2906002)(7736002)(6916009)(4743002)(478600001)(2950100002)(106356001)(82746002)(105586002)(6116002)(3846002)(99286004)(36756003)(3660700001)(53936002)(83716003)(2351001)(66066001)(3280700002)(76176011)(5250100002)(33656002)(6246003)(5640700003)(97736004)(68736007)(25786009)(2501003)(316002)(229853002)(8936002)(5660300001)(6486002)(8676002)(81166006)(81156014)(14454004)(6512007)(102836004)(6436002)(2900100001)(4326008)(53546011)(6506007)(26005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM3PR08MB0103; H:AM3PR08MB0101.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: mk8mlJ7V0N7ALHP2eaFfezTpMgGSG7OhYGDvgpOFUmEP58Csgk2lsfjvwlA7RSnOBlImy+1mZy/NmLQptIeRgQ== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: <98BAD81278A1714AB99D9A7E1C695D28@eurprd08.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 14ccc07d-7bb6-4f5c-ef34-08d55cebf6f2 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jan 2018 14:18:07.0947 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM3PR08MB0103 X-IsSubscribed: yes > On 16 Jan 2018, at 09:50, Alan Hayward wrote: > > 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 removed > in the next patch. > > diff --git a/gdb/Makefile.in b/gdb/Makefile.in > index 0a4a06b242e0423218648fe77d53fc192456cd2f..386ab5c117ebf34e1ae927b5fe78fd4618012945 100644 > --- a/gdb/Makefile.in > +++ b/gdb/Makefile.in > @@ -669,6 +669,7 @@ ALL_TARGET_OBS = \ > arch/arm-get-next-pcs.o \ > arch/arm-linux.o \ > arch/i386.o \ > + arch/tdesc.o \ > arm-bsd-tdep.o \ > arm-fbsd-tdep.o \ > arm-linux-tdep.o \ > Apologies, just spotted a slight bug. If you build with don’t build with --enable-targets=all then you’ll get a link error with gdb. The Makefile.in diff needs changing to the following (instead of the change above) With this, everything builds with and without --enable-targets=all, and all run tests continue to pass. Alan. --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -913,6 +912,7 @@ COMMON_SFILES = \ agent.c \ annotate.c \ arch-utils.c \ + arch/tdesc.c \ auto-load.c \ auxv.c \ ax-gdb.c \