This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] inadvertent language switch during breakpoint_re_set_one
- From: Pedro Alves <palves at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>, Tom Tromey <tom at tromey dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 1 Jun 2018 13:42:19 +0100
- Subject: Re: [RFA] inadvertent language switch during breakpoint_re_set_one
- References: <1525976353-67414-1-git-send-email-brobecker@adacore.com> <87fu2z1fmf.fsf@tromey.com> <20180510204034.uxpqi3uuvvmk7koc@adacore.com>
LGTM. Could nits below.
On 05/10/2018 09:40 PM, Joel Brobecker wrote:
> --- a/gdb/breakpoint.c
> +++ b/gdb/breakpoint.c
> @@ -13881,6 +13881,19 @@ breakpoint_re_set (void)
> scoped_restore save_input_radix = make_scoped_restore (&input_radix);
> scoped_restore_current_pspace_and_thread restore_pspace_thread;
>
> + /* breakpoint_re_set_one sets the current_language to the language
> + of the breakpoint it is resetting (see prepare_re_set_context)
> + before re-evaluating the breakpoint's location. This change can
> + unfortunately get undone by accident if the language_mode is set
> + to auto, and we either switch frames, or more likely in this context,
> + we select the current frame.
> +
> + We prevent this by temporarily turning the language_mode to
> + language_mode_manual. We we restore it once all breakpoints
Double "We we".
> +gdb_run_cmd
> +gdb_test "" \
> + "Breakpoint $decimal, a \\(\\).*" \
> + "Run until breakpoint at a'address"
Lowercase "run".
Thanks,
Pedro Alves