This is the mail archive of the gdb-patches@sources.redhat.com 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: [dictionary] commit for 2003-03-06


On Fri, 7 Mar 2003 09:40:17 -0500, Daniel Jacobowitz <drow at mvista dot com> said:
> On Thu, Mar 06, 2003 at 04:52:56PM -0800, David Carlton wrote:

>> Question for those of you who have read this far: now that
>> lookup_symbol_aux_minsyms is on its last legs (it's gone on the
>> branch), do you think we could get rid of the demangled hash table
>> for minsyms?  I'll try to audit uses of lookup_minimal_symbol
>> tomorrow or next week.

> No.  Every time you talk about removing something with minimal
> symbols, remember that we can use them to debug a program with no
> symbolic debug info.

Yeah, I think you're right.  I was thinking about this last night, and
I realized that decode_line_1 is a likely culprit: it needs to do
minimal symbol lookups in order to be able to break on functions with
no debug info.

Except that, of course, the story isn't that simple: the only part of
decode_line_1 that should care whether it uses the linkage name
instead of the natural name is decode_compound, and that part of the
code currently _doesn't_ do a lookup_minimal_symbol.  Sigh.  So, right
now, I actually think we could get rid of the demangled hash table
without causing any problems.  But I think that should probably be
considered a bug in decode_compound rather than a reason to get rid of
the demangled hash table.

And there might be uses elsewhere, too: I haven't yet audited all the
uses of lookup_minimal_symbol.  I'm fairly sure that the symbol lookup
functions in symtab.c are safe, from memory, and there shouldn't be
_too_ many other places that want a natural name when looking at
minimal symbols, but there might be some.

David Carlton
carlton at math dot stanford dot edu


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