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: [patchv2] Fix C++ regression for bpt conditionals


>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Tom> This also may not be foolproof.

Jan> Why not?

I don't have a specific reason, I am just not certain that all code
paths starting from the language parsers are safe against changing
current_language.

Jan> +  inner_chain = make_cleanup_restore_current_language ();
Jan> +
Jan> +  /* get_current_arch may reset CURRENT_LANGUAGE via select_frame.  */
Jan>    initialize_expout (10, lang, get_current_arch ());
 
Jan> +  set_language (lang->la_language);

This will restore current_language to its value before get_current_arch
is called.

But IIRC in your original note you said that this is the call that
changes current_language.

I am not sure, but I think we don't want to lose this language change.
It seems like it could be the spot that causes the transition from
"minimal" to whatever language "main" (or whatever) is using.

FWIW this is the language hopping problem that Joel has mentioned a
couple of times.  Grrrr, globals.


The rest of the patch looks good to me.

Tom


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