[RFA] inadvertent language switch during breakpoint_re_set_one

Joel Brobecker brobecker@adacore.com
Fri Jun 1 16:39:00 GMT 2018


> > --- 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. Attached is the commit I just pushed (to master).

-- 
Joel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-inadvertent-language-switch-during-breakpoint_re_set.patch
Type: text/x-diff
Size: 7047 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20180601/8e5fab7f/attachment.bin>


More information about the Gdb-patches mailing list