On 11/16/2017 12:08 PM, David Malcolm wrote:
> It's useful to be able to put a breakpoint on the *emission* of
> a diagnostic (without having to step past all of the warnings
> that are suppressed because of command-line options).
> 
> The invocation:
> 
>   (gdb) break diagnostic_show_locus
> 
> has been my approach for this for a while (it even works in
> the presence of -fno-diagnostics-show-caret).
> 
> This patch adds a pre-canned gdb command for adding this
> breakpoint.
> 
> Not sure if I can self-approve this, but it's been very useful;
> it works nicely with tab-completion.  I guess I'll commit it
> in a few days, unless people here can suggest improvements.
> 
> gcc/ChangeLog:
>       * gdbinit.in (break-on-diagnostic): New command.
OK.
jeff

Reply via email to