This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: What to do with info addr and location expressions
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?