From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 125086 invoked by alias); 19 Jun 2017 19:59:38 -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 125076 invoked by uid 89); 19 Jun 2017 19:59:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=*c X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 19 Jun 2017 19:59:27 +0000 Received: by simark.ca (Postfix, from userid 33) id C20111E4D7; Mon, 19 Jun 2017 15:59:30 -0400 (EDT) To: Yao Qi Subject: Re: [PATCH 00/25 V2] Make GDB builtin target descriptions more flexible X-PHP-Originating-Script: 33:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 19 Jun 2017 19:59:00 -0000 From: Simon Marchi Cc: gdb-patches@sourceware.org In-Reply-To: <1497256916-4958-1-git-send-email-yao.qi@linaro.org> References: <1497256916-4958-1-git-send-email-yao.qi@linaro.org> Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.2.5 X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg00537.txt.bz2 On 2017-06-12 10:41, Yao Qi wrote: > This patch series is to change GDB and GDBserver builtin target > descriptions more flexible, by removing pre-generated ones. Instead, > these builtin target descriptions can be got lazily and dynamically. > GDB builtin target descriptions are created from initialize_tdesc_* > functions in features/*.c files, while GDBserver builtin target > descriptions are generated from regformats/*.dat files. > > This patch series changes both GDB and GDBserver to create target > description dynamically from features, instead of using pre-generated > target descriptions. This patch series only convert x86-linux ( > including i386-linux, amd64-linux and x32-linux) target description > to demonstrate the usefulness of the change. > > Once one target architecture switches to the new flexible target > description, > > - only need xml feature files under gdb/features directory. All > 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 don't need to add new target description xml files. > > - All existing gdb/regformats/*.dat are not used, but kept for > the tests. > > This is the V2, and V1 is here > https://sourceware.org/ml/gdb-patches/2017-05/msg00291.html, > the differences are, > > - 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) > > The big design change in V2 is that use generate c files from > xml feature files, and use generate c files in both GDB and > GDBserver. > > In next step, I want to remove the duplication of target > descriptions in GDB and GDBserver, and share more code on > creating x86-linux target descriptions in GDB and GDBserver. > I also want people give comments on how to do unit/self > tests in GDBserver, see patch 14. The purpose of this patch > series is still to demonstrate the design, so the changelog, > NEWS entry, and doc may be incomplete. I'll complete them > later. > > Regression tested on x86_64-linux (both -m64 and -m32), > native and 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