This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC] lookup problem in blockframe.c:inside_main_func()
> [First of all, what path takes you through lookup_symbol to that
> prompt? That shouldn't ever happen, unless it's being generated in
> Ada-specific code...]
It is generated in ada-specific code. Just FYI, here is our ada-specific
lookup function, which is hooked into the language vector:
struct symbol *
ada_lookup_symbol ([snip])
{
[snip]
n_candidates = ada_lookup_symbol_list (ada_mangle (ada_fold_name (name)),
block0, namespace, &candidates);
if (n_candidates == 0)
return NULL;
else if (n_candidates != 1)
user_select_syms (candidates, n_candidates, 1); <<<-----
[snip]
}
user_select_syms causes the menu to appear...
> Don't use lookup_symbol? On David's branch there's a minsym function
> for finding the minimal symbol associated with a mangled name. I
> thought it had been merged to mainline but it hasn't. Something to do
> the same for symbols would be reasonable, although rare.
> Or you could
> just use the minsym version, and then call find_pc_function.
That's a good idea, I think. Lookup the minsym.... Hmmm, let me explore
this path. Thanks!
--
Joel