diff options
author | Kamil Rytarowski <n54@gmx.com> | 2018-06-25 18:49:13 +0000 |
---|---|---|
committer | Kamil Rytarowski <n54@gmx.com> | 2018-06-25 18:49:13 +0000 |
commit | 993ef0ca960f8ffd107c33bfbf1fd603bcf5c66c (patch) | |
tree | fcfe3530b21a34a318422c819186a627fd3d8f74 /lib/DebugInfo | |
parent | e51396c3aeb8fec219e7a3c965031c15fb2934a5 (diff) |
Handle NetBSD specific path in findDebugBinary()
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.
Reviewers: joerg, vitalybuka
Reviewed By: vitalybuka
Subscribers: JDevlieghere, llvm-commits
Differential Revision: https://reviews.llvm.org/D48525
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335511 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/DebugInfo')
-rw-r--r-- | lib/DebugInfo/Symbolize/Symbolize.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/DebugInfo/Symbolize/Symbolize.cpp b/lib/DebugInfo/Symbolize/Symbolize.cpp index c4a8b8d31db..f760a0ef65c 100644 --- a/lib/DebugInfo/Symbolize/Symbolize.cpp +++ b/lib/DebugInfo/Symbolize/Symbolize.cpp @@ -192,8 +192,13 @@ bool findDebugBinary(const std::string &OrigPath, Result = DebugPath.str(); return true; } +#if defined(__NetBSD__) + // Try /usr/libdata/debug/path/to/original_binary/debuglink_name + DebugPath = "/usr/libdata/debug"; +#else // Try /usr/lib/debug/path/to/original_binary/debuglink_name DebugPath = "/usr/lib/debug"; +#endif llvm::sys::path::append(DebugPath, llvm::sys::path::relative_path(OrigDir), DebuglinkName); if (checkFileCRC(DebugPath, CRCHash)) { |