From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8989 invoked by alias); 11 Dec 2012 16:42:10 -0000 Received: (qmail 8974 invoked by uid 22791); 11 Dec 2012 16:42:08 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 11 Dec 2012 16:42:02 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Tue, 11 Dec 2012 16:42:01 +0000 Received: from [10.1.69.62] ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.0); Tue, 11 Dec 2012 16:41:58 +0000 Message-ID: <50C76256.8000401@arm.com> Date: Tue, 11 Dec 2012 16:42:00 -0000 From: Yufeng Zhang User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: gdb-patches@sourceware.org CC: Tom Tromey , Marcus Shawcroft Subject: Re: RFA: handle "MiniDebuginfo" section References: <87wqxuel5k.fsf@fleche.redhat.com> <87zk2mbym3.fsf@fleche.redhat.com> <877gpp8i67.fsf@fleche.redhat.com> <50A29B8B.7050606@redhat.com> <87r4nx5ih1.fsf@fleche.redhat.com> <87390c40ys.fsf@fleche.redhat.com> <20643.62177.106208.211209@ruffy2.mtv.corp.google.com> <50A4CF6D.40207@redhat.com> <87r4nttjgl.fsf@fleche.redhat.com> <50AA44F4.9020609@redhat.com> <871ufggoh9.fsf@fleche.redhat.com> In-Reply-To: <871ufggoh9.fsf@fleche.redhat.com> X-MC-Unique: 112121116420100101 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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 X-SW-Source: 2012-12/txt/msg00344.txt.bz2 Hi Tom, On 26/11/12 19:20, Tom Tromey wrote: > diff --git a/gdb/testsuite/gdb.base/gnu-debugdata.exp b/gdb/testsuite/gdb= .base/gnu-debugdata.exp > new file mode 100644 > index 0000000..f876309 [snip] > +# Extract the dynamic symbols from the main binary, there is no need > +# to also have these in the normal symbol table. > +remote_file host delete ${binfile}.dynsyms > +if {[pipeline "nm -D" \ > + [list [transform nm] "-D ${binfile} --format=3Dposix --defined-o= nly"] \ > + [list awk "\\{print\\ \\\$1\\}"] \ > + [list sort "" "" "${binfile}.dynsyms"]]} { > + return -1 > +} The test can fail when there is no dynamic symbols in the binary file as=20 'nm' will return 1 with an error message of "No symbols"; binaries for=20 baremetal targets usually don't have dynamic symbols. In such a case, I=20 think the test should generate an empty ${binfile}.dynsyms and continue.=20 Or maybe the tests should only be run for linux targets? > +# Inject the compressed data into the .gnu_debugdata section of the > +# original binary. > +remote_file host delete ${binfile}.mini_debuginfo.xz > +if {[run "xz" "xz" "${binfile}.mini_debuginfo"]} { > + return -1 > +} This creates a dependency on 'xz'. I think either its availability=20 should be checked before the test (and return UNSUPPORTED if 'xz' not=20 found), or 'xz' should be documented as required in the section of=20 "Requirements for Building GDB". Thanks, Yufeng