This is an archive of the discontinued LLVM Phabricator instance.

[llvm-symbolizer] Add `--output-style` switch.
ClosedPublic

Authored by ikudrin on Apr 3 2019, 3:13 AM.

Details

Summary

In general, llvm-symbolizer follows the output style of GNU's addr2line. However, there are still some differences; in particular, for a requested address, llvm-symbolizer prints line and column, while addr2line prints only line number.

This patch adds a new switch to select the preferred style.

Other dissimilarities might be addressed later if required.

Diff Detail

Repository
rL LLVM

Event Timeline

ikudrin created this revision.Apr 3 2019, 3:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 3 2019, 3:13 AM
jhenderson accepted this revision.Apr 3 2019, 4:52 AM

LGTM, with one comment. Feel free to ignore the comment, if you feel strongly about using the existing input file.

test/tools/llvm-symbolizer/output-style.test
1 ↗(On Diff #193453)

Could you put the addresses explicitly here instead of piping from a file?

This revision is now accepted and ready to land.Apr 3 2019, 4:52 AM

Thanks! I believe you are right. I'll put explicit addresses on commit.

rupprecht accepted this revision.Apr 3 2019, 9:31 AM

Thanks for splitting this change off.

This revision was automatically updated to reflect the committed changes.