This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] wrong language used when re-setting breakpoint
> My concern was really that your patch might be obscuring some other bug.
> But, it sounds like this other bug no longer exists. In that case I
> think your patch is a cleanup and should stay in.
Makes sense. Thank you.
In the meantime, I have found the source of the language switch, and
I know why you're not seeing it. There is a function called
ada-lang.c:add_symbols_from_enclosing_procs which is empty in the
official tree, but starts with the following code in our tree:
frame = deprecated_safe_get_selected_frame ();
(not sure why this code hasn't been contributed yet, I will look into
that this winter after Xmas).
This function gets called during the breakpoint re-set phase of
the "nested_sub" breakpoint, via the ada_lookup_symbol_list function.
The exact sequence is:
ada_lookup_symbol_list
-> ada_add_local_symbols
-> add_symbols_from_enclosing_procs
-> deprecated_safe_get_selected_frame
[...]
-> select_frame
-> set_language
The frame in question is in the loader (/usr/lib/debug/lib/ld-2.11.1.so).
You can probably reproduce the same problem by adding the call in
your version of add_symbols_from_enclosing_procs. Perhaps we (AdaCore)
should also do something to avoid the language-switch side-effect,
but I am hesitant to do anything, because I'm thinking I might affect
something else later on.
--
Joel