From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 68179 invoked by alias); 24 Jan 2018 09:26:32 -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 13506 invoked by uid 89); 24 Jan 2018 09:26:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-12.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=receipt X-HELO: EUR01-HE1-obe.outbound.protection.outlook.com Received: from mail-he1eur01on0043.outbound.protection.outlook.com (HELO EUR01-HE1-obe.outbound.protection.outlook.com) (104.47.0.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 24 Jan 2018 09:26:13 +0000 Received: from DB3PR08MB0106.eurprd08.prod.outlook.com (10.161.56.20) by DB3PR08MB0108.eurprd08.prod.outlook.com (10.161.56.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Wed, 24 Jan 2018 09:26: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; Wed, 24 Jan 2018 09:26:10 +0000 From: Alan Hayward To: "gdb-patches@sourceware.org" CC: nd Subject: [PATCH v2 0/8] Remove XML files from gdbserver Date: Wed, 24 Jan 2018 09:26:00 -0000 Message-ID: <7C97CC6A-92CB-4702-820D-206022F07102@arm.com> authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DB3PR08MB0108;7:A7HwUYf+leDkvpfBzrdAOmUyK6HMMSu63N5m3wf7JyoOUpPJ89zWs749KHAk2uW/8TaPPQ99U+fsHCOLYAAIKi8JB5GBhBq0z3qmp+5f0L+qS6Lhu12UpjHOVBXYOWK7u7qIvKVFEii969S0kNNC5+R8lJuY94aAkfW/YkiqBZQ94Rhdd025v+zxrtR6GWuUsPwaaiKIdgG6omGMFK8pxDULbKsWyIqpeZaKN+GkYXVjjFmDIhsZ2nLmpU5zvM8l x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: cdcff38e-9d2c-4abe-714b-08d5630c8144 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(2017052603307)(7153060)(7193020);SRVR:DB3PR08MB0108; x-ms-traffictypediagnostic: DB3PR08MB0108: nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040501)(2401047)(5005006)(8121501046)(3231023)(2400081)(944501161)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041288)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123560045)(6072148)(201708071742011);SRVR:DB3PR08MB0108;BCL:0;PCL:0;RULEID:;SRVR:DB3PR08MB0108; x-forefront-prvs: 056297E276 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39860400002)(366004)(376002)(346002)(396003)(39380400002)(189003)(199004)(2351001)(3280700002)(4326008)(25786009)(82746002)(3660700001)(83716003)(6506007)(106356001)(97736004)(6916009)(305945005)(99286004)(105586002)(6436002)(86362001)(478600001)(5640700003)(72206003)(2900100001)(5250100002)(81166006)(2501003)(8936002)(8676002)(2906002)(7736002)(5660300001)(81156014)(26005)(36756003)(68736007)(6486002)(14454004)(33656002)(316002)(66066001)(6116002)(102836004)(3846002)(53936002)(6512007);DIR:OUT;SFP:1101;SCL:1;SRVR:DB3PR08MB0108;H:DB3PR08MB0106.eurprd08.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: cGwrGthyu/TMTrCP62HJtGNbAV8fgc0tE06NfoRDm/zU26jwsNFaY4MeX6iA7xEdBRdO+pJYFctsR1lxEDht3A== 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: cdcff38e-9d2c-4abe-714b-08d5630c8144 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jan 2018 09:26:10.1046 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR08MB0108 X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg00462.txt.bz2 Following review comments from Yao, this patch series is mostly a reordering of the code from the previous patch series. This set of patches removes the need for gdbserver to ship the xml files in the binary for those targets that use new style target descriptions. In exisiting code, gdbserver uses C code auto generated from xml files to create target descriptions. When sending an xml description to GDB, it creates an xml containing just the name of the original xml file. Upon receipt, GDB reads and parses a local copy of xml file. With this new patch, we add common code that allows gdbserver and gdb to turn a C target description structure into xml. To do this we must first ensure that when gdbserver parses a target description it retains enough information to turn it back into xml. The second patch commonises tdesc_reg, the third patch commonises tdesc_feature and the fifth patch commonises the tdesc type structures. This enables gdbserver to store all required information about a target description. The sixth patch adds the xml printer. The other patches are clean up patches. Patches have been tested on a make check on x86 targets=3Dall build with target board unix native-gdbserver. Also tested aarch64. Built for power (becuase it does not use new target descriptions), but am unable to test. In addition, patch four adds new test cases to unit test. Alan. gdb/Makefile.in | 1 - gdb/arch/tdesc.c | 425 ------------------------ gdb/arch/tdesc.h | 307 +----------------- gdb/features/aarch64-core.c | 2 +- gdb/features/aarch64-fpu.c | 2 +- gdb/features/i386/32bit-avx.c | 2 +- gdb/features/i386/32bit-avx512.c | 2 +- gdb/features/i386/32bit-core.c | 2 +- gdb/features/i386/32bit-linux.c | 2 +- gdb/features/i386/32bit-mpx.c | 2 +- gdb/features/i386/32bit-pkeys.c | 2 +- gdb/features/i386/32bit-sse.c | 2 +- gdb/features/i386/64bit-avx.c | 2 +- gdb/features/i386/64bit-avx512.c | 2 +- gdb/features/i386/64bit-core.c | 2 +- gdb/features/i386/64bit-linux.c | 2 +- gdb/features/i386/64bit-mpx.c | 2 +- gdb/features/i386/64bit-pkeys.c | 2 +- gdb/features/i386/64bit-segments.c | 2 +- gdb/features/i386/64bit-sse.c | 2 +- gdb/features/i386/x32-core.c | 2 +- gdb/features/tic6x-c6xp.c | 2 +- gdb/features/tic6x-core.c | 2 +- gdb/features/tic6x-gp.c | 2 +- gdb/gdbserver/Makefile.in | 3 - gdb/gdbserver/configure.srv | 36 +++ gdb/gdbserver/tdesc.c | 229 +++++++------ gdb/gdbserver/tdesc.h | 58 +++- gdb/regformats/regdat.sh | 5 +- gdb/target-descriptions.c | 924 +++++++++++++++++++++++++++++++++= ++++++-------------- gdb/xml-tdesc.c | 9 - gdb/xml-tdesc.h | 5 - 32 files changed, 920 insertions(+), 1124 deletions(-)