From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25126 invoked by alias); 8 Oct 2004 20:38:58 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 25064 invoked from network); 8 Oct 2004 20:38:56 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 8 Oct 2004 20:38:56 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i98Kcpfr003190 for ; Fri, 8 Oct 2004 16:38:56 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i98Kcor05276; Fri, 8 Oct 2004 16:38:50 -0400 Received: from redhat.com (dhcp-172-16-25-137.sfbay.redhat.com [172.16.25.137]) by potter.sfbay.redhat.com (8.12.8/8.12.8) with ESMTP id i98KcmkP021121; Fri, 8 Oct 2004 16:38:49 -0400 Message-ID: <4166FAD8.9090301@redhat.com> Date: Fri, 08 Oct 2004 20:38:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.4) Gecko/20030922 MIME-Version: 1.0 To: Daniel Jacobowitz CC: gdb-patches@sources.redhat.com Subject: Re: [rfa] Dwarf2 testsuite References: <20041008183500.GA6625@nevyn.them.org> In-Reply-To: <20041008183500.GA6625@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-10/txt/msg00162.txt.bz2 Daniel Jacobowitz wrote: > This patch adds a sample test for DWARF-2 unit testing. It requires: > - gas, for the .uleb128/.sleb128 directives among other things > - ELF; it could probably be made to work on non-ELF dwarf2 systems > but I don't know what changes would be necessary. Perhaps those > should be tested separately. > > I haven't tried, but I wrote it with the intent that it would not care about > the host beyond that; it should run on 64-bit ELF targets OK. > > It just includes a trivial test containing hand-written DIEs for a single > CU. This one file I annotated exhaustively, and let me tell you, it was > exhausting; for future tests I will allow them to be self-documenting (the > comments don't say anything that compiling the file and running readelf > won't tell you). > > The test itself just demonstrates that the dwarf2 reader isn't completely > busted. But more interesting tests could be easily added. > > Look OK? Suggestions? > Looks exhausting. I'm glad you're doing this. Dan, what would you think about (somebody) writing a tool that could read some sort of description (eg. what's in your comments), and generate the dwarf2 recs? Sort of a simple compiler that accepts, in effect, the dwarf2 spec as input? Would that be, perhaps, less of an effort than writing a sufficiently large subset of tests by hand?