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
Daniel Berlin writes:
> > 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?
[pedantic: inline conditional on gcc of course]
I'd rather not have gdb ship with ./binutils.
Why not create a new TLD named elf or dwarf or some such and include it
in binutils and gdb distributions.
I don't have an opinion on whether one would care whether this particular
directory has multiple libraries (libelf, libdwarf).
If one finds that unpalatable, call it dwarf and begin a libdwarf now
(or whatever). It needed be all-singing/all-dancing in its first cut.