This is the mail archive of the gdb@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: C++/Java regressions


On 26 Nov 2003 16:04:55 -0500, Ian Lance Taylor <ian@wasabisystems.com> said:
> Daniel Jacobowitz <drow@mvista.com> writes:
>> On Tue, Nov 25, 2003 at 11:04:41PM -0500, Ian Lance Taylor wrote:

>>> Then when gdb goes to look up T5<int>, it finds the DWARF psymbol
>>> for the class itself, but it also finds that the symbol might be a
>>> namespace.  It then decides that it is a namespace.

>> That sounds like the bit that's wrong.  If it found a psymbol for
>> the class why does it decide to call it a namespace?

> Good question.  My guess is that it's because lookup_symbol_aux()
> calls current_language->la_lookup_symbol_nonlocal() before it calls
> lookup_symbol_aux_psymtabs().  If I force
> la_lookup_symbol_nonlocal() to return NULL, then
> lookup_symbol_aux_psymtabs() finds the typedef, and `ptype T5<int>'
> works more or less correctly.

Thanks for the investigation.  Then I think that my latest patch
awaiting approval should fix this, if we're lucky - it treats C++
class symbols as global objects instead of static objects.
(Basically, we want to find the class before we ever reach the calls
to lookup_symbol_aux_{,p}symtabs in lookup_symbol_aux: it should be
found in the language-specific bit.)  I'll double check to make sure
that's the issue, but I'm optimistic.

David Carlton
carlton@kealia.com


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