[Symbolize] Add log markup --filter to llvm-symbolizer.
authorDaniel Thornburgh <dthorn@google.com>
Wed, 4 May 2022 22:47:42 +0000 (22:47 +0000)
committerDaniel Thornburgh <dthorn@google.com>
Mon, 27 Jun 2022 17:44:15 +0000 (10:44 -0700)
commiteb5af0acf054a73d461ac768d8cb035ee2a64383
tree46459b3fe625a4fa41021b77f38fbf464b7ca18f
parentee0dd2ec112b3fa727f199709a0d8992eaa13b3b
[Symbolize] Add log markup --filter to llvm-symbolizer.

This adds a --filter option to llvm-symbolizer. This takes log-bearing
symbolizer markup from stdin and writes a human-readable version to
stdout.

For now, this only implements the "symbol" markup tag; all others are
passed through unaltered. This is a proof-of-concept bit of
functionalty; implement the various tags is more-or-less just a matter
of hooking up various parts of the Symbolize library to the architecture
established here.

Reviewed By: peter.smith

Differential Revision: https://reviews.llvm.org/D126980
15 files changed:
llvm/docs/CommandGuide/llvm-symbolizer.rst
llvm/docs/Reference.rst
llvm/docs/ReleaseNotes.rst
llvm/docs/SymbolizerMarkupFormat.rst [new file with mode: 0644]
llvm/include/llvm/DebugInfo/Symbolize/Markup.h
llvm/include/llvm/DebugInfo/Symbolize/MarkupFilter.h [new file with mode: 0644]
llvm/lib/DebugInfo/Symbolize/CMakeLists.txt
llvm/lib/DebugInfo/Symbolize/MarkupFilter.cpp [new file with mode: 0644]
llvm/test/DebugInfo/symbolize-filter-markup-color.test [new file with mode: 0644]
llvm/test/DebugInfo/symbolize-filter-markup-error-location.test [new file with mode: 0644]
llvm/test/DebugInfo/symbolize-filter-markup-symbol.test [new file with mode: 0644]
llvm/test/DebugInfo/symbolize-filter-markup-tag.test [new file with mode: 0644]
llvm/test/tools/llvm-symbolizer/filter-markup.test [new file with mode: 0644]
llvm/tools/llvm-symbolizer/Opts.td
llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp