This is an archive of the discontinued LLVM Phabricator instance.

[Symbolizer] Handle {{{bt}}} symbolizer markup element.
ClosedPublic

Authored by mysterymath on Aug 25 2022, 3:20 PM.

Details

Summary

This adds support for backtrace generation to the llvm-symbolizer markup
filter, which is likely the largest use case.

Diff Detail

Event Timeline

mysterymath created this revision.Aug 25 2022, 3:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 25 2022, 3:20 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
mysterymath requested review of this revision.Aug 25 2022, 3:20 PM
Herald added a project: Restricted Project. · View Herald Transcript

Fix test case for Windows.

Do you need to update the docs/SymbolizerMarkupFormat.rst to say that backtrace is now implemented?

Code changes look good to me.

llvm/test/DebugInfo/symbolize-filter-markup-bt.test
14

If there is a good place, could be worth an entry in the SymbolizerMarkupFormat or somewhere in the documentation explaining what the X.Y format is. IIUC we'd expect it when there are inlined function(s).

61

If I've interpreted this right, there was some function called second, that probably just called first() so it has been inlined here? Only mention of second that I could find was as an inline function.

May be worth a comment as it could help explain the backtrace.

mcgrathr added inline comments.Aug 30 2022, 10:46 AM
llvm/test/DebugInfo/symbolize-filter-markup-bt.test
14

The markup format does not specify what human-readable output looks like.
Symbolization of backtraces including "virtual frames" for inlined functions is a QoI question for a particular symbolizing filter and how those are presented is a UI question for a particular presentation style.

I think it makes sense for the llvm-symbolizer documentation to describe its output formats, but that should not be conflated with the specification of the markup format.

mysterymath marked 2 inline comments as done.

Add documentation.
Correct syntax used to print inline call numbers.

Do you need to update the docs/SymbolizerMarkupFormat.rst to say that backtrace is now implemented?

Yes, knew I was forgetting something.

llvm/test/DebugInfo/symbolize-filter-markup-bt.test
14

Added this to the llvm-symbolizer documentation.

61

Added a copy of the source used to generate this as a comment. This should also make it possible to update this example if the debug information goes stale.

peter.smith accepted this revision.Aug 31 2022, 1:08 AM

Thanks for the updates. Looks good to me.

This revision is now accepted and ready to land.Aug 31 2022, 1:08 AM