[44/45] gdbinit.in: add break-on-saved-diagnostic
diff mbox series

Message ID 20191213181134.1830-45-dmalcolm@redhat.com
State New
Headers show
  • v4 of analyzer patch kit
Related show

Commit Message

David Malcolm Dec. 13, 2019, 6:11 p.m. UTC
This patch adds a "break-on-saved-diagnostic" command to gdbinit.in,
useful for debugging when a diagnostic is queued by the analyzer.

	* gdbinit.in (break-on-saved-diagnostic): New command.
 gcc/gdbinit.in | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff mbox series

diff --git a/gcc/gdbinit.in b/gcc/gdbinit.in
index 42302aecfe3c..c7e4a33335f4 100644
--- a/gcc/gdbinit.in
+++ b/gcc/gdbinit.in
@@ -219,6 +219,16 @@  is emitted (as opposed to those warnings that are suppressed by
 command-line options).
+define break-on-saved-diagnostic
+break diagnostic_manager::add_diagnostic
+document break-on-saved-diagnostic
+Put a breakpoint on diagnostic_manager::add_diagnostic, called within
+the analyzer whenever a diagnostic is saved for later de-duplication and
+possible emission.
 define reload-gdbhooks
 python import imp; imp.reload(gdbhooks)