diff options
author | David Malcolm <dmalcolm@redhat.com> | 2024-05-15 21:22:51 -0400 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2024-05-15 21:22:51 -0400 |
commit | 3cd267446755ab6b2c59936a718d34c8bc474ca5 (patch) | |
tree | 017b586dc28cb09be709b49dad35070fda091d04 /gcc/dwarf2codeview.h | |
parent | a7be993806a90a58397e9d5bc9b54160ac9f35db (diff) | |
download | gcc-3cd267446755ab6b2c59936a718d34c8bc474ca5.zip gcc-3cd267446755ab6b2c59936a718d34c8bc474ca5.tar.gz gcc-3cd267446755ab6b2c59936a718d34c8bc474ca5.tar.bz2 |
diagnostics: simplify output of purely intraprocedural execution paths
Diagnostic path printing was added in r10-5901-g4bc1899b2e883f. As of
that commit, with -fdiagnostics-path-format=inline-events (the default),
we print a vertical line to the left of the source line numbering,
visualizing the stack depth and interprocedural calls and returns as
indentation changes.
For cases where the events on a thread are purely interprocedural, this
line does nothing except take up space and complicate the output.
This patch adds logic to omit it for such cases, simpifying the output,
and, I believe, improving readability.
gcc/ChangeLog:
* diagnostic-path.h: Update leading comment to reflect
intraprocedural cases. Fix typo in comment.
* doc/invoke.texi: Update intraprocedural example.
gcc/testsuite/ChangeLog:
* c-c++-common/analyzer/allocation-size-multiline-1.c: Update
expected results for purely intraprocedural path.
* c-c++-common/analyzer/allocation-size-multiline-2.c: Likewise.
* c-c++-common/analyzer/allocation-size-multiline-3.c: Likewise.
* c-c++-common/analyzer/analyzer-verbosity-0.c: Likewise.
* c-c++-common/analyzer/analyzer-verbosity-1.c: Likewise.
* c-c++-common/analyzer/analyzer-verbosity-2.c: Likewise.
* c-c++-common/analyzer/analyzer-verbosity-3.c: Likewise.
* c-c++-common/analyzer/malloc-macro-inline-events.c: Likewise.
Doing so for this file requires a rewrite since the paths
prefixing the "in expansion of macro" lines become the only thing
on their line and so are no longer pruned by multiline.exp logic
for pruning extra content on non-blank lines.
* c-c++-common/analyzer/malloc-paths-9-noexcept.c: Likewise.
* c-c++-common/analyzer/setjmp-2.c: Likewise.
* gcc.dg/analyzer/malloc-paths-9.c: Likewise.
* gcc.dg/analyzer/out-of-bounds-multiline-2.c: Likewise.
* gcc.dg/plugin/diagnostic-test-paths-2.c: Likewise.
gcc/ChangeLog:
* tree-diagnostic-path.cc (per_thread_summary::interprocedural_p):
New.
(thread_event_printer::print_swimlane_for_event_range): Don't
indent and print the stack depth line if this thread's events are
purely intraprocedural.
(selftest::test_intraprocedural_path): Update expected output.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'gcc/dwarf2codeview.h')
0 files changed, 0 insertions, 0 deletions