This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: A gdb+bfd string pool?
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Andrew Cagney <ac131313 at redhat dot com>
- Cc: binutils at sources dot redhat dot com, gdb at sources dot redhat dot com
- Date: Fri, 31 Oct 2003 10:19:27 -0500
- Subject: Re: A gdb+bfd string pool?
- References: <3FA27C9B.1000702@redhat.com>
On Fri, Oct 31, 2003 at 10:15:39AM -0500, Andrew Cagney wrote:
> Hello,
>
> GDB, to contain its run-time size is, uses gdb/bcaches where ...
> /* A bcache is a data structure for factoring out duplication in
> read-only structures. You give the bcache some string of bytes S.
> If the bcache already contains a copy of S, it hands you back a
> pointer to its copy. Otherwise, it makes a fresh copy of S, and
> hands you back a pointer to that. In either case, you can throw
> away your copy of S, and use the bcache's.
> One notable feature of this mechanism is that it lets you eliminate
> string equality comparisons - equal bcache values implies equal strings.
>
> Now, if I'm reading the BFD elf reader correctly, elf-strtab implements
> a similar mechanism (But I think it is currently only used by the linker?).
>
> Should/could BFD export a string pool that GDB could use and then use
> that for any slurped symbol names?
Well, if so, it should go in libiberty - and in fact, is the hash table
in libiberty in any way unsuited to replace bcache?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer