From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13550 invoked by alias); 13 Mar 2018 17:58:50 -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 13521 invoked by uid 89); 13 Mar 2018 17:58:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_ASCII_DIVIDERS,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy= X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 13 Mar 2018 17:58:47 +0000 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2DHsW11077737 for ; Tue, 13 Mar 2018 13:58:45 -0400 Received: from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108]) by mx0b-001b2d01.pphosted.com with ESMTP id 2gpgykf2t4-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Tue, 13 Mar 2018 13:58:45 -0400 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 13 Mar 2018 17:58:43 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 13 Mar 2018 17:58:42 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w2DHwgxx53739564; Tue, 13 Mar 2018 17:58:42 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8527B4C044; Tue, 13 Mar 2018 17:51:57 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4BC984C050; Tue, 13 Mar 2018 17:51:57 +0000 (GMT) Received: from ThinkPad (unknown [9.152.212.63]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 13 Mar 2018 17:51:57 +0000 (GMT) Date: Tue, 13 Mar 2018 17:58:00 -0000 From: Philipp Rudo To: Alan Hayward Cc: "gdb-patches@sourceware.org" , nd Subject: Re: [PATCH V3 0/8] Remove gdbserver dependency on xml files In-Reply-To: <31D78CCB-F760-4279-9035-19D68D4009B5@arm.com> References: <757A8B89-2EF0-46BD-BAA6-6E668538B17F@arm.com> <20180312181931.704aa7bf@ThinkPad> <31D78CCB-F760-4279-9035-19D68D4009B5@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 x-cbid: 18031317-0008-0000-0000-000004DD0162 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18031317-0009-0000-0000-00001E700156 Message-Id: <20180313185840.74cfd7e3@ThinkPad> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-13_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=9 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1803130203 X-IsSubscribed: yes X-SW-Source: 2018-03/txt/msg00270.txt.bz2 Hi Alan, i managed to track the bug down (cannot say i understood what the problem is though). It's in patch #6 please see the comments there. > Could you please try gdb.gdb/unittest.exp and gdb.server/unittest.exp > As that=E2=80=99ll test every xml file your build uses. For the unittests you have to register the target description first. That's= not done for s390 currently. However i hacked something together and it helped= me find an other bug in patch #6. Thanks Philipp > And, if there are any errors could you please send me the .log file conte= nts - think I > should have enough info from there to debug (don=E2=80=99t have an s390 t= o try this myself). >=20 > Your review comments on the other patches make sense. Haven=E2=80=99t had= a chance to > try the changes yet, but I=E2=80=99ll reply there if I have any issues wi= th them. >=20 > Many thanks for the review! >=20 > Alan. >=20 > > On 12 Mar 2018, at 17:19, Philipp Rudo wrote: > >=20 > > Hi Alan, > >=20 > > sorry for the late response. Here are my first findings. I'm afraid t= here is > > a bug somewhere in you patch set. When running the testsuite there are= quite a > > lot of test from gdb.server failing (at least on s390). I have to take = a closer > > look at it tomorrow. > >=20 > > Nevertheless there are some comments i already have to your patches. > >=20 > > Thanks > > Philipp > >=20 > >=20 > > On Fri, 9 Mar 2018 08:21:36 +0000 > > Alan Hayward wrote: > >=20=20=20 > >> Ping for this series please. > >>=20 > >> Alan. > >>=20=20=20 > >>> 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= /xml3. > >>>=20 > >>> Summary: > >>>=20 > >>> 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 generat= ed from > >>> cached xml files. > >>> This is made possible by changing xml descriptions generated by gdbse= rver, so > >>> that instead of including xml file names, gdbserver now generate a co= mplete > >>> xml description. > >>>=20 > >>> The second point will be required for aarch64 SVE support, where the = register > >>> size are variable. Creating SVE xml files for every possible vector l= ength > >>> would not be feasible. Instead the plan for aarch64 SVE is to hand wr= ite 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, t= he > >>> 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 o= f the > >>> xml files. Gdbserver keeps full copies all the xml files inside the b= inary. > >>>=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 en= tire > >>> target description structure back into xml, without using any cached = files. > >>> Producing, for example: > >>>=20 > >>> > >>> > >>> i386 > >>> GNU/Linux > >>> > >>> > >>> > >>> > >>> > >>> > >>> ...etc... > >>>=20 > >>>=20 > >>> Patch Contents: > >>>=20 > >>> Patches 2-4 commonise the various target descriptor functionality, al= lowing > >>> gdbserver to parse target descriptions in the same way as gdb. This s= eries > >>> does not commonise target_desc, but this is hopefully a long term goa= l. > >>>=20 > >>> The sixth patch adds the xml printer, which iterates through the pars= ing > >>> 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 w= ith > >>> target board unix native-gdbserver. Also tested aarch64. Built for po= wer > >>> (because it does not use new target descriptions), but am unable to t= est. > >>> 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=20=20 > >>=20=20=20 > >=20=20=20 >=20