[PATCH] D113717: [Symbolizer][Debuginfo] Add debuginfod client to llvm-symbolizer.
Noah Shutty via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 11 14:33:00 PST 2021
noajshu created this revision.
Herald added subscribers: hiraditya, mgorny.
noajshu requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Adds a fallback to use the debuginfod client library (386655) in `findDebugBinary`.
https://reviews.llvm.org/D113717
Files:
llvm/lib/DebugInfo/Symbolize/CMakeLists.txt
llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
Index: llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
===================================================================
--- llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
+++ llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
@@ -20,6 +20,7 @@
#include "llvm/DebugInfo/DWARF/DWARFContext.h"
#include "llvm/DebugInfo/PDB/PDB.h"
#include "llvm/DebugInfo/PDB/PDBContext.h"
+#include "llvm/Debuginfod/Debuginfod.h"
#include "llvm/Demangle/Demangle.h"
#include "llvm/Object/COFF.h"
#include "llvm/Object/MachO.h"
@@ -384,7 +385,15 @@
}
}
}
- return false;
+ // Try debuginfod client cache and known servers.
+ Expected<std::string> PathOrErr =
+ getCachedOrDownloadDebuginfo(buildIDToString(BuildID));
+ if (!PathOrErr) {
+ consumeError(PathOrErr.takeError());
+ return false;
+ }
+ Result = *PathOrErr;
+ return true;
}
} // end anonymous namespace
Index: llvm/lib/DebugInfo/Symbolize/CMakeLists.txt
===================================================================
--- llvm/lib/DebugInfo/Symbolize/CMakeLists.txt
+++ llvm/lib/DebugInfo/Symbolize/CMakeLists.txt
@@ -9,6 +9,7 @@
LINK_COMPONENTS
DebugInfoDWARF
DebugInfoPDB
+ Debuginfod
Object
Support
Demangle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113717.386669.patch
Type: text/x-patch
Size: 1205 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211111/ae47ae23/attachment.bin>
More information about the llvm-commits
mailing list