[llvm] LLVM symbolizer gsym support (PR #134847)
Mariusz Kwiczala via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 30 01:44:47 PDT 2025
================
@@ -498,6 +500,37 @@ bool LLVMSymbolizer::getOrFindDebugBinary(const ArrayRef<uint8_t> BuildID,
return false;
}
+std::string LLVMSymbolizer::lookUpGsymFile(const std::string &Path) {
+ if (Opts.DisableGsym)
+ return {};
+
+ auto CheckGsymFile = [](const llvm::StringRef &GsymPath) {
+ sys::fs::file_status Status;
+ std::error_code EC = llvm::sys::fs::status(GsymPath, Status);
+ return !EC && !llvm::sys::fs::is_directory(Status);
+ };
+
+ // First, look beside the binary file
+ {
+ const auto GsymPath = Path + ".gsym";
+ if (CheckGsymFile(GsymPath))
+ return GsymPath;
+ }
----------------
sfc-gh-mkwiczala wrote:
Thank you. Added suggestion
https://github.com/llvm/llvm-project/pull/134847
More information about the llvm-commits
mailing list