summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/Symbolize
diff options
context:
space:
mode:
authorKamil Rytarowski <n54@gmx.com>2018-06-25 18:49:13 +0000
committerKamil Rytarowski <n54@gmx.com>2018-06-25 18:49:13 +0000
commita8448ad09823e3ea38dc4a50e815ebd46cdc2cd9 (patch)
tree6f8a383c12712307570b5d59dc9a98cbdc4f49fa /llvm/lib/DebugInfo/Symbolize
parent6fd7d680b0a6d101cbeb93f16f3e90a14d8c4fe9 (diff)
downloadbcm5719-llvm-a8448ad09823e3ea38dc4a50e815ebd46cdc2cd9.tar.gz
bcm5719-llvm-a8448ad09823e3ea38dc4a50e815ebd46cdc2cd9.zip
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 llvm-svn: 335511
Diffstat (limited to 'llvm/lib/DebugInfo/Symbolize')
-rw-r--r--llvm/lib/DebugInfo/Symbolize/Symbolize.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/Symbolize/Symbolize.cpp b/llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
index c4a8b8d31db..f760a0ef65c 100644
--- a/llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
+++ b/llvm/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)) {
OpenPOWER on IntegriCloud