From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 99490 invoked by alias); 9 Mar 2018 08:21:45 -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 99481 invoked by uid 89); 9 Mar 2018 08:21:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.8 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_ASCII_DIVIDERS,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=sixth, 2-4, receipt X-HELO: EUR01-DB5-obe.outbound.protection.outlook.com Received: from mail-db5eur01on0046.outbound.protection.outlook.com (HELO EUR01-DB5-obe.outbound.protection.outlook.com) (104.47.2.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 09 Mar 2018 08:21:41 +0000 Received: from AM3PR08MB0101.eurprd08.prod.outlook.com (10.160.211.19) by AM3PR08MB0279.eurprd08.prod.outlook.com (10.161.35.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.548.13; Fri, 9 Mar 2018 08:21:37 +0000 Received: from AM3PR08MB0101.eurprd08.prod.outlook.com ([fe80::fc60:4b4d:7de8:f8b7]) by AM3PR08MB0101.eurprd08.prod.outlook.com ([fe80::fc60:4b4d:7de8:f8b7%16]) with mapi id 15.20.0548.018; Fri, 9 Mar 2018 08:21:36 +0000 From: Alan Hayward To: "gdb-patches@sourceware.org" CC: nd Subject: Re: [PATCH V3 0/8] Remove gdbserver dependency on xml files Date: Fri, 09 Mar 2018 08:21:00 -0000 Message-ID: References: <757A8B89-2EF0-46BD-BAA6-6E668538B17F@arm.com> In-Reply-To: <757A8B89-2EF0-46BD-BAA6-6E668538B17F@arm.com> x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;AM3PR08MB0279;7:TWBC9zPsZtKftZwva4nP5AireKvIjComDlzzddOp0dHeptxKay10CSv9Xt/F7P70Gs1lzmAfG+v2Xg7Re6QqN1RJFo43qSqcQ/07ML88lEvkl6E2+fklYZwzv/+Hxu5g9UWkPAqxKwZM0FhxQhCVT2kxnb5hugTFonZMag/zR/dBOYAyahjDJKre96V58N0BeZ9Pl2/uZZjHyEUYj/jVJiOuFXGezMmovxbU/2z8vPx+ZMzx2U9ubxdHx8u3imkR x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 4fc7a59b-857e-4fa3-0091-08d58596c6b2 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:AM3PR08MB0279; x-ms-traffictypediagnostic: AM3PR08MB0279: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(180628864354917)(17755550239193); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(3231220)(944501244)(52105095)(10201501046)(93006095)(93001095)(6055026)(6041310)(20161123562045)(20161123558120)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:AM3PR08MB0279;BCL:0;PCL:0;RULEID:;SRVR:AM3PR08MB0279; x-forefront-prvs: 0606BBEB39 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39860400002)(376002)(39380400002)(396003)(346002)(366004)(199004)(189003)(20264003)(99286004)(53936002)(6436002)(6512007)(14454004)(8676002)(36756003)(6116002)(3846002)(66066001)(5660300001)(81166006)(81156014)(76176011)(6486002)(6916009)(4326008)(316002)(86362001)(305945005)(7736002)(5640700003)(72206003)(3280700002)(102836004)(25786009)(8936002)(53546011)(229853002)(6246003)(2351001)(5250100002)(2906002)(186003)(3660700001)(68736007)(105586002)(82746002)(26005)(97736004)(83716003)(106356001)(478600001)(2950100002)(33656002)(6506007)(2501003)(2900100001);DIR:OUT;SFP:1101;SCL:1;SRVR:AM3PR08MB0279;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: QT0kEOhy1ypYv1FZIe3ZDXW0rUP4XX5vpqm+OXnA8gSN1nNMAJeZMRbrFBomYD6kb7NxQhZR+5+5HetAMLI8N9njNcK5OLjMl6wJaPt+x3BAhQzRZWFQm3o1Lka7PKEOc0sRt4P0o7XcVWA8aHyFuTB6N8MCX0sNwz5YzkaCzKgcxGIWvg3FGwCPdTTliPv9ke1b6v3npbk+t+cZXAUG5DU2/cglHORSHNyY/OpxQE3moMStRwcHArL6ZyAIy8O9jtutNwgxZfD+MnlwOLeC5j1qoAv3eVVerYOAAjiR2woeOuFw/rJFtd/hy+L3z3pxSqIudWd2OfJ0ORBqk3CzKg== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: <39E622A0AEE494448A56CD893F01974F@eurprd08.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4fc7a59b-857e-4fa3-0091-08d58596c6b2 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Mar 2018 08:21:36.4811 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM3PR08MB0279 X-IsSubscribed: yes X-SW-Source: 2018-03/txt/msg00189.txt.bz2 Ping for this series please. Alan. > On 1 Mar 2018, at 11:38, Alan Hayward wrote: >=20 > V3 builds on previous review comments, and the additional patches I've > already pushed. Complete patch series pushed to branch users/ahayward/xml= 3. >=20 > Summary: >=20 > For those targets that use new style target descriptions, this set of pat= ches > removes the dependency on xml files. Namely: > * Removes inclusion of xml files within gdbserver. > * Removes the requirement for the .c files in features/ to be generated f= rom > cached xml files. > This is made possible by changing xml descriptions generated by gdbserver= , so > that instead of including xml file names, gdbserver now generate a comple= te > xml description. >=20 > The second point will be required for aarch64 SVE support, where the regi= ster > size are variable. Creating SVE xml files for every possible vector length > would not be feasible. Instead the plan for aarch64 SVE is to hand write = the > features/ .c code that would normally be generated from xml. >=20 >=20 > XML Generation: >=20 > In existing code, gdbserver uses C code auto generated from xml files to > create target descriptions. When sending an xml description to GDB, the > function tdesc_get_features_xml () creates an xml containing the name of = the > original xml file(s). For example: >=20 > > > i386 > GNU/Linux > > > > > >=20 > Upon receipt, GDB then makes requests to gdbserver for the contents of the > xml files. Gdbserver keeps full copies all the xml files inside the binar= y. >=20 > This patch series adds common code that allows gdbserver (and gdb) to turn > a C target description structure into xml. > Now when asked fort an xml description to gdb, gdbserver turns the entire > target description structure back into xml, without using any cached file= s. > Producing, for example: >=20 > > > i386 > GNU/Linux > > > > > > > ...etc... >=20 >=20 > Patch Contents: >=20 > Patches 2-4 commonise the various target descriptor functionality, allowi= ng > gdbserver to parse target descriptions in the same way as gdb. This series > does not commonise target_desc, but this is hopefully a long term goal. >=20 > The sixth patch adds the xml printer, which iterates through the parsing > generated in the previous patches. >=20 > The other patches are clean up patches. >=20 >=20 >=20 > 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 > (because it does not use new target descriptions), but am unable to test. > In addition, patch six adds new test cases to unit test. >=20 > Alan. >=20 > gdb/Makefile.in | 2 + > gdb/common/tdesc.c | 445 ++++++++++++++++++++++++++++++++= +++++++++++++++++++++++++++++++++++++++++++++ > gdb/common/tdesc.h | 313 ++++++++++++++++++++++++++++++++= ++++++++++++++++++++++- > 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 | 240 ++++++++++++++++++--------------= ---------- > gdb/gdbserver/tdesc.h | 57 ++-------- > gdb/regformats/regdat.sh | 5 +- > gdb/target-descriptions.c | 596 ++++++++++++--------------------= ------------------------------------------------------------------------ > gdb/xml-tdesc.c | 9 ++ > gdb/xml-tdesc.h | 5 + > 32 files changed, 974 insertions(+), 779 deletions(-) >=20