gdbinit.in: add "break-on-diagnostic" command
authorDavid Malcolm <dmalcolm@redhat.com>
Fri, 17 Nov 2017 15:27:09 +0000 (15:27 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Fri, 17 Nov 2017 15:27:09 +0000 (15:27 +0000)
gcc/ChangeLog:
* gdbinit.in (break-on-diagnostic): New command.

From-SVN: r254877

gcc/ChangeLog
gcc/gdbinit.in

index f706890ad37e3f2b528e56b09a39a56c3a668b30..8a186a148a7151eccd8089f261a629254d5943b7 100644 (file)
@@ -1,3 +1,7 @@
+2017-11-17  David Malcolm  <dmalcolm@redhat.com>
+
+       * gdbinit.in (break-on-diagnostic): New command.
+
 2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
 
        * config/i386/i386.c (ix86_expand_epilogue): Change simple
index 3e1279e5b2a2d0c8ec7818e9bd004627baf5d5a8..ebdeaf0f2c9eaf4c5fed256a7531054665d6a76b 100644 (file)
@@ -208,6 +208,16 @@ document pcfun
 Print current function.
 end
 
+define break-on-diagnostic
+break diagnostic_show_locus
+end
+
+document break-on-diagnostic
+Put a breakpoint on diagnostic_show_locus, called whenever a diagnostic
+is emitted (as opposed to those warnings that are suppressed by
+command-line options).
+end
+
 # Define some macros helpful to gdb when it is expanding macros.
 macro define __FILE__ "gdb"
 macro define __LINE__ 1