From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 50232 invoked by alias); 26 Jun 2017 14:45:42 -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 49795 invoked by uid 89); 26 Jun 2017 14:45:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Deutschland, observation, deutschland, Tel X-HELO: mga05.intel.com Received: from mga05.intel.com (HELO mga05.intel.com) (192.55.52.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 26 Jun 2017 14:45:17 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP; 26 Jun 2017 07:45:03 -0700 X-ExtLoop1: 1 Received: from irsmsx107.ger.corp.intel.com ([163.33.3.99]) by fmsmga002.fm.intel.com with ESMTP; 26 Jun 2017 07:45:02 -0700 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.26]) by IRSMSX107.ger.corp.intel.com ([169.254.10.129]) with mapi id 14.03.0319.002; Mon, 26 Jun 2017 15:45:01 +0100 From: "Tedeschi, Walfred" To: Simon Marchi , Yao Qi CC: "gdb-patches@sourceware.org" Subject: RE: [PATCH 00/25 V2] Make GDB builtin target descriptions more flexible Date: Mon, 26 Jun 2017 14:45:00 -0000 Message-ID: References: <1497256916-4958-1-git-send-email-yao.qi@linaro.org> In-Reply-To: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg00706.txt.bz2 -----Original Message----- From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-owner@sourceware= .org] On Behalf Of Simon Marchi Sent: Monday, June 19, 2017 9:00 PM To: Yao Qi Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 00/25 V2] Make GDB builtin target descriptions more fle= xible On 2017-06-12 10:41, Yao Qi wrote: > This patch series is to change GDB and GDBserver builtin target=20 > descriptions more flexible, by removing pre-generated ones. Instead,=20 > these builtin target descriptions can be got lazily and dynamically. > GDB builtin target descriptions are created from initialize_tdesc_*=20 > functions in features/*.c files, while GDBserver builtin target=20 > descriptions are generated from regformats/*.dat files. >=20 > This patch series changes both GDB and GDBserver to create target=20 > description dynamically from features, instead of using pre-generated=20 > target descriptions. This patch series only convert x86-linux (=20 > including i386-linux, amd64-linux and x32-linux) target description to=20 > demonstrate the usefulness of the change. >=20 > Once one target architecture switches to the new flexible target=20 > description, >=20 > - only need xml feature files under gdb/features directory. All=20=20 > existing target description xml files can be kept for the tests. > Add new xml feature file if we want to support the new feature, but=20 > don't need to add new target description xml files. >=20 > - All existing gdb/regformats/*.dat are not used, but kept for the=20 > tests. >=20 > This is the V2, and V1 is here > https://sourceware.org/ml/gdb-patches/2017-05/msg00291.html, > the differences are, >=20 > - Change target descriptions for both GDB and GDBserver, > - Generate functions creating features from xml feature file > instead of feature name, so that don't have to worry about > different features with the same name (different features > with the same name still have different file names). > - Extend the changes for i386-linux to x86-linux (including, > {i386,amd64,x32}-linux) >=20 > The big design change in V2 is that use generate c files from xml=20 > feature files, and use generate c files in both GDB and GDBserver. >=20 > In next step, I want to remove the duplication of target descriptions=20 > in GDB and GDBserver, and share more code on creating x86-linux target=20 > descriptions in GDB and GDBserver. > I also want people give comments on how to do unit/self tests in=20 > GDBserver, see patch 14. The purpose of this patch series is still to=20 > demonstrate the design, so the changelog, NEWS entry, and doc may be=20 > incomplete. I'll complete them later. >=20 > Regression tested on x86_64-linux (both -m64 and -m32), native and=20 > gdbserver, on aarch64-linux native and gdbserver. > ppc64-linux, native. Hi Yao, Do you have a git branch we can pull from to look at this change? Thanks, Simon Hello Yao, I did some tests and they are looking fine for remote and native gdb. I could tweak the XCR0 in GDB and GDBSERVER and see tests that also use cpu= -id to detect features failing, as expected! Very nice! Thanks again! As an observation, in the gdbserver side there are calls to _get_ipa_tdesc.= I suppose we could rename this to a more generic name. About the design: GDBserver still uses the combination of cpu features to b= uild the target description.=20 On the other hand, the improvement was= huge, i.e. I would go to accept the patch and consider an additional patch= series to address gdbserver tdesc creation.=20 Best regards, /Fred =20=20 Intel Deutschland GmbH Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Christian Lamprechter Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928