This is an archive of the discontinued LLVM Phabricator instance.

[Debuginfod] Flag-determine debuginfod lookups in llvm-symbolizer.
ClosedPublic

Authored by mysterymath on Jan 31 2022, 4:07 PM.

Details

Summary

This change adds a pair of flags controlling whether llvm-symbolizer
attempts debuginfod lookups. Lookups are attempted if --debuginfod is
passed and disabled if --no-debuginfod is passed.

The default behavior is made more nuanced: debuginfod lookups are now
only attempted if an HTTP client is compiled in and at least one backing
debuginfod URL was configured via environment variable. Previously,
debuginfod lookups would always be attempted, even if there were no
chance that they could succeed.

Diff Detail

Event Timeline

mysterymath created this revision.Jan 31 2022, 4:07 PM

Update from parent.

mysterymath published this revision for review.Feb 1 2022, 12:35 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 1 2022, 12:35 PM

(general direction looks good - thanks for CC'ing me on these, btw, @phosek - I'll likely chime in if/where I have concerns, but might leave review to you/others otherwise, if that's OK - if you have particular questions you'd like me to weigh in on, or want my explicit approval, just let me know & I'm happy to provide it - otherwise happy just to ride along/keep an eye on it all)

Update from parent.

phosek accepted this revision.Feb 8 2022, 3:28 PM

LGTM

llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp
292–295

This is just a nit, but I find that having the comment here not followed by any code a bit confusing, especially since it's referring to logic inside main. I'd slightly prefer just inlining this function together with these comments into main.

This revision is now accepted and ready to land.Feb 8 2022, 3:28 PM
mysterymath marked an inline comment as done.
  • Merge with upstream.
llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp
292–295

This needed a bit more logic to merge with the other debuginfod changes, but I did rearrange it so the comment corresponds to an explicit return false.

This revision was landed with ongoing or failed builds.Feb 9 2022, 2:21 PM
This revision was automatically updated to reflect the committed changes.