This is an archive of the discontinued LLVM Phabricator instance.

Handle NetBSD specific path in findDebugBinary()
ClosedPublic

Authored by krytarowski on Jun 23 2018, 5:02 PM.

Details

Summary

The NetBSD Operating System installs debuginfo
files into /usr/libdata/debug, rather than other path
like in some other popular distribution.

This change makes llvm-symbolizer functional with
the basesystem executables.

Diff Detail

Repository
rL LLVM

Event Timeline

krytarowski created this revision.Jun 23 2018, 5:02 PM
vitalybuka added inline comments.Jun 25 2018, 11:07 AM
lib/DebugInfo/Symbolize/Symbolize.cpp
195 ↗(On Diff #152608)

Can we just try both paths and have the same behavior everywhere?

krytarowski added inline comments.Jun 25 2018, 11:10 AM
lib/DebugInfo/Symbolize/Symbolize.cpp
195 ↗(On Diff #152608)

A similar ifdef is in LLDB.. but I will change the code to try out both paths.

vitalybuka added inline comments.Jun 25 2018, 11:15 AM
lib/DebugInfo/Symbolize/Symbolize.cpp
195 ↗(On Diff #152608)

Thanks. I'd prefer version without ifdef.
But if you get pushback from lldb, please just make it consistent.

vitalybuka accepted this revision.Jun 25 2018, 11:16 AM

lgtm in any case

This revision is now accepted and ready to land.Jun 25 2018, 11:16 AM
krytarowski added inline comments.Jun 25 2018, 11:48 AM
lib/DebugInfo/Symbolize/Symbolize.cpp
195 ↗(On Diff #152608)

I will go for ifdef, as [likely] /usr/libdata will be never valid for others and /usr/lib never valid for NetBSD.

This revision was automatically updated to reflect the committed changes.