This is the mail archive of the gdb-patches@sourceware.org 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: [RFA] wrong language used when re-setting breakpoint


>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:

Joel> In the meantime, I have found the source of the language switch, and
Joel> I know why you're not seeing it.  There is a function called
Joel> ada-lang.c:add_symbols_from_enclosing_procs which is empty in the
Joel> official tree, but starts with the following code in our tree:
Joel>    frame = deprecated_safe_get_selected_frame ();

Ah, I see.

Joel> Perhaps we (AdaCore) should also do something to avoid the
Joel> language-switch side-effect, but I am hesitant to do anything,
Joel> because I'm thinking I might affect something else later on.

I don't really know the Ada code well enough to comment.
The current code you have sounds tricky, maybe too tricky.

I wouldn't mind pushing linespec to be more fully parameterized.
However, this is maybe non-trivial if it calls out into other parts of
gdb.

I do see that linespec itself takes care to restore current_language in
a similar scenario; see get_search_block.  But I wonder whether this can
have the effect of accidentally dropping a language switch.

Tom


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