From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1931 invoked by alias); 21 Jul 2003 20:14:24 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 1919 invoked from network); 21 Jul 2003 20:14:23 -0000 Received: from unknown (HELO dberlin.org) (69.3.5.6) by sources.redhat.com with SMTP; 21 Jul 2003 20:14:23 -0000 Received: from [127.0.0.1] (HELO dberlin.org) by dberlin.org (CommuniGate Pro SMTP 4.1b9) with ESMTP-TLS id 4586172; Mon, 21 Jul 2003 16:14:23 -0400 Date: Mon, 21 Jul 2003 20:14:00 -0000 From: Daniel Berlin To: Nick Clifton cc: Jim Blandy , gdb@sources.redhat.com, binutils@sources.redhat.com Subject: Re: What to do with info addr and location expressions In-Reply-To: Message-ID: References: <16152.3014.959070.885970@localhost.redhat.com> <20030718153016.GA17382@nevyn.them.org> <3F18175E.30607@redhat.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2003-07/txt/msg00274.txt.bz2 On Mon, 21 Jul 2003, Nick Clifton wrote: > Hi Jim, > > >> One thing though - readelf does not, and should not, used the bfd > >> library. One of its main goals is to provide an alternative to bfd > >> for parsing and displaying ELF files, so that it can act as a > >> sanity/bug check. > > > > The natural home for such code would be a libdwarf, but we don't have > > that yet. In the the mean time, could the code live in libiberty, > > like the demangler? > > I do not think that this is really suitable for libiberty. > > The simplest method would be to break the code out into a separate > file that lives in the binutils/ directory and which could then be > compiled into either readelf or gdb. I'll go one better (or worse). Since we don't know the binutils directory will be around when you compiel gdb, why not make the functions (which are really trivial, and just large switch statements) static inline, and put them in a file somewhere in include/, a directory shared by all? > > Cheers > Nick > > >