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] inadvertent language switch during breakpoint_re_set_one


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


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