From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114856 invoked by alias); 12 Mar 2018 14:05:07 -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 114847 invoked by uid 89); 12 Mar 2018 14:05:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.7 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-qk0-f182.google.com Received: from mail-qk0-f182.google.com (HELO mail-qk0-f182.google.com) (209.85.220.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 Mar 2018 14:05:04 +0000 Received: by mail-qk0-f182.google.com with SMTP id s78so1938233qkl.8 for ; Mon, 12 Mar 2018 07:05:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=A/64Il5p96ctzRv45CD6+3M81CWclZzievnsmHH17tc=; b=DruSZxL3FJwZPWbiW5ObHyYaK7qIc1zCaKE4rGhegf7Tbq8Hv4teug183E1ky58xu0 3eKkqv5kwTBAS8fu5o2gl1oUEXmn3DQUYje3NLiRzsjGErTgNJ7G8iaJHBx2prL46yMB O3y7rFNuwbZZMvRAu/1Hb4gAxpOScksTxOHCVqJX1k79UU6xDdt90uaUiuMPkZ/xqmEA gy5I9TCI39oO02aHZjXnQlJthGn3zTp8OiGiXu4pSnyqtiDvdcRz+22kv3LXLBe5Q8BG YJqc4V1/s+i+e2nX7Oy75bNELEhbKW2Or3ASuWWGxAKotWB/HB1xglGuFCL4QHSr8GUU UyKg== X-Gm-Message-State: AElRT7FNjB8wGXiDzoItoyv761uSjtHiw97gInBW2uGszCx/bGm1KKVO JMSVUqjUmfPPg7tL7EHEjrKT9/E8RFKdutecA0m5Cg== X-Google-Smtp-Source: AG47ELubhAXtB5k0ID8NKSucPNL7mi1937qX8MRLRNjj18t5I2q2smzJeVoyZDBdGaBRTObfB4q/yfLUqvIU9IMX5qY= X-Received: by 10.55.125.65 with SMTP id y62mr11654632qkc.241.1520863502825; Mon, 12 Mar 2018 07:05:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.237.33.238 with HTTP; Mon, 12 Mar 2018 07:04:32 -0700 (PDT) In-Reply-To: References: <757A8B89-2EF0-46BD-BAA6-6E668538B17F@arm.com> From: Omair Javaid Date: Mon, 12 Mar 2018 14:05:00 -0000 Message-ID: Subject: Re: [PATCH V3 0/8] Remove gdbserver dependency on xml files To: Alan Hayward Cc: "gdb-patches@sourceware.org" , nd Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-03/txt/msg00241.txt.bz2 Hi Alan, Your patch series look good overall. I wanted to have a look at the overall code after applying this series but it still doesnt work. First 2 patches apply just fine. Patch 3 fails. Thanks! On 9 March 2018 at 13:21, Alan Hayward wrote: > Ping for this series please. > > Alan. > > > On 1 Mar 2018, at 11:38, Alan Hayward wrote: > > > > V3 builds on previous review comments, and the additional patches I've > > already pushed. Complete patch series pushed to branch > users/ahayward/xml3. > > > > Summary: > > > > For those targets that use new style target descriptions, this set of > patches > > 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 > from > > 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 > complete > > xml description. > > > > The second point will be required for aarch64 SVE support, where the > register > > 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. > > > > > > XML Generation: > > > > 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: > > > > > > > > i386 > > GNU/Linux > > > > > > > > > > > > > > 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 > binary. > > > > 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 > files. > > Producing, for example: > > > > > > > > i386 > > GNU/Linux > > > > > > > > > > > > > > ...etc... > > > > > > Patch Contents: > > > > Patches 2-4 commonise the various target descriptor functionality, > allowing > > 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. > > > > The sixth patch adds the xml printer, which iterates through the parsing > > generated in the previous patches. > > > > The other patches are clean up patches. > > > > > > > > Patches have been tested on a make check on x86 targets=all 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. > > > > Alan. > > > > 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(-) > > > >