This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: What to do with info addr and location expressions
- From: Jim Blandy <jimb at redhat dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: gdb at sources dot redhat dot com, binutils at sources dot redhat dot com
- Date: 21 Jul 2003 12:57:01 -0500
- Subject: Re: What to do with info addr and location expressions
- References: <16152.3014.959070.885970@localhost.redhat.com><20030718153016.GA17382@nevyn.them.org> <3F18175E.30607@redhat.com><m3y8ysf81z.fsf@redhat.com>
Nick Clifton <nickc@redhat.com> writes:
> Hi Guys
>
> > [added binutils: gdb needs a way of printing out dwarf2 location
> > expressions]
> >
> > Why not share the readelf code? Print both the actual expression and
> > (for simple cases) an English translation.
>
> readelf was not written with the intention of being used as a
> library. That does not mean however that the expression printing code
> could not be moved into a separate file and then compiled in to both
> gdb and readelf.
>
> 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?