This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: C++/Java regressions
- From: mec dot gnu at mindspring dot com (Michael Elizabeth Chastain)
- To: drow at mvista dot com, ian at wasabisystems dot com
- Cc: gdb at sources dot redhat dot com
- Date: Wed, 26 Nov 2003 16:17:36 -0500 (EST)
- Subject: Re: C++/Java regressions
ian> Good question. My guess is that it's because lookup_symbol_aux()
ian> calls current_language->la_lookup_symbol_nonlocal() before it calls
ian> lookup_symbol_aux_psymtabs(). If I force la_lookup_symbol_nonlocal()
ian> to return NULL, then lookup_symbol_aux_psymtabs() finds the typedef,
ian> and `ptype T5<int>' works more or less correctly.
Have a look at
http://sources.redhat.com/gdb/bugs/1465
I just mailed in an analysis of a similar bug. It will take some
time for gnats to post it.
Briefly, the call tree is:
lookup_symbol_aux
current_language->la_lookup_symbol_nonlocal
lookup_symbol_file
lookup_symbol_static [1]
lookup_symbol_aux_block
lookup_symbol_global [2]
lookup_possible_namespace_symbol [3]
lookup_symbol_aux_symtabs [4]
lookup_symbol_aux_psymtabs
You are probably getting a hit at [3].
Check the value of "block" in lookup_symbol_file. I bet that
you have block=0. That prevents [1] from finding a match in the current
static block.
[4] is a kludge that looks in ALL static blocks. That's not good.
Before [3] came along as part of DavidC's namespace work,
[4] was happening all the time.
I think the right fix is to pass a correct "block" to local_symbol_aux
so that [1] can do its job properly.
Michael C