This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Demangle partial symbols and save memory too

On Sun, Jan 26, 2003 at 05:55:22PM -0800, Paul N. Hilfinger wrote:
> > This also lets us uniquely share the symbol names between msyms, psyms, and
> > full symbols.  More memory savings, and we get the demangling for free.
> While you're in there merging symbol strings, perhaps you can explain
> this code from stabsread.c (there might be similar code for other
> readers; I haven't looked): In define_symbol, handling of 'T' case:
>       if (TYPE_TAG_NAME (SYMBOL_TYPE (sym)) == 0)
> 	  = obconcat (&objfile->type_obstack, "", "", SYMBOL_NAME (sym));
> Why can't just SYMBOL_NAME (sym) be used for the TYPE_TAG_NAME value?  

At a guess, the theory is because SYMBOL_NAME is on the symbol_obstack
and we can discard symbols when we can't necessarily discard types - if
I remember right, there's some other problems that interfere with
discarding types when we discard an objfile.

As I said, that's just a guess.

Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]