<div dir="ltr"><div>This module was committed in r316773, and allows developers to manage a variety of diagnostic breakpoints.</div><div><br></div><div>Feedback on syntax, usability, and missing features is welcome.</div><div><br></div><div><div>(lldb) help clangdiag</div><div>     For more information run 'help clangdiag'  Expects 'raw' input (see 'help raw-input'.)</div><div><br></div><div>Syntax:</div><div>     Commands for managing clang diagnostic breakpoints</div><div><br></div><div>Syntax: clangdiag enable [<warning>|<diag-name>]</div><div>        clangdiag disable</div><div>        clangdiag diagtool [<path>|reset]</div><div><br></div><div>The following subcommands are supported:</div><div><br></div><div>      enable   -- Enable clang diagnostic breakpoints.</div><div>      disable  -- Disable all clang diagnostic breakpoints.</div><div>      diagtool -- Return, set, or reset diagtool path.</div><div><br></div><div>This command sets breakpoints in clang, and clang based tools, that</div><div>emit diagnostics.  When a diagnostic is emitted, and clangdiag is</div><div>enabled, it will use the appropriate diagtool application to determine</div><div>the name of the DiagID, and set breakpoints in all locations that</div><div>'diag::name' appears in the source.  Since the new breakpoints are set</div><div>after they are encountered, users will need to launch the executable a</div><div>second time in order to hit the new breakpoints.</div><div><br></div><div>For in-tree builds, the diagtool application, used to map DiagID's to</div><div>names, is found automatically in the same directory as the target</div><div>executable.  However, out-or-tree builds must use the 'diagtool'</div><div>subcommand to set the appropriate path for diagtool in the clang debug</div><div>bin directory.  Since this mapping is created at build-time, it's</div><div>important for users to use the same version that was generated when</div><div>clang was compiled, or else the id's won't match.</div><div><br></div><div>Notes:</div><div>- Substrings can be passed for both <warning> and <diag-name>.</div><div>- If <warning> is passed, only enable the DiagID(s) for that warning.</div><div>- If <diag-name> is passed, only enable that DiagID.</div><div>- Rerunning enable clears existing breakpoints.</div><div>- diagtool is used in breakpoint callbacks, so it can be changed</div><div>  without the need to rerun enable.</div><div>- Adding this to your ~.lldbinit file makes clangdiag available at startup:</div><div>  "command script import /path/to/clangdiag.py</div></div><div><br></div><div>thanks...</div><div>don</div><div><br></div><div><br></div><div><br></div></div>