diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:10:56 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:10:56 +0000 |
| commit | 044eb2f6afba375a914ac9d8024f8f5142bb912e (patch) | |
| tree | 1475247dc9f9fe5be155ebd4c9069c75aadf8c20 /lib/DebugInfo/Symbolize/Symbolize.cpp | |
| parent | eb70dddbd77e120e5d490bd8fbe7ff3f8fa81c6b (diff) | |
Notes
Diffstat (limited to 'lib/DebugInfo/Symbolize/Symbolize.cpp')
| -rw-r--r-- | lib/DebugInfo/Symbolize/Symbolize.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/DebugInfo/Symbolize/Symbolize.cpp b/lib/DebugInfo/Symbolize/Symbolize.cpp index 19711ca58c6f0..e997ef5b6069c 100644 --- a/lib/DebugInfo/Symbolize/Symbolize.cpp +++ b/lib/DebugInfo/Symbolize/Symbolize.cpp @@ -22,7 +22,6 @@ #include "llvm/DebugInfo/PDB/PDB.h" #include "llvm/DebugInfo/PDB/PDBContext.h" #include "llvm/Object/COFF.h" -#include "llvm/Object/ELFObjectFile.h" #include "llvm/Object/MachO.h" #include "llvm/Object/MachOUniversal.h" #include "llvm/Support/Casting.h" @@ -53,10 +52,11 @@ namespace llvm { namespace symbolize { -Expected<DILineInfo> LLVMSymbolizer::symbolizeCode(const std::string &ModuleName, - uint64_t ModuleOffset) { +Expected<DILineInfo> +LLVMSymbolizer::symbolizeCode(const std::string &ModuleName, + uint64_t ModuleOffset, StringRef DWPName) { SymbolizableModule *Info; - if (auto InfoOrErr = getOrCreateModuleInfo(ModuleName)) + if (auto InfoOrErr = getOrCreateModuleInfo(ModuleName, DWPName)) Info = InfoOrErr.get(); else return InfoOrErr.takeError(); @@ -80,9 +80,9 @@ Expected<DILineInfo> LLVMSymbolizer::symbolizeCode(const std::string &ModuleName Expected<DIInliningInfo> LLVMSymbolizer::symbolizeInlinedCode(const std::string &ModuleName, - uint64_t ModuleOffset) { + uint64_t ModuleOffset, StringRef DWPName) { SymbolizableModule *Info; - if (auto InfoOrErr = getOrCreateModuleInfo(ModuleName)) + if (auto InfoOrErr = getOrCreateModuleInfo(ModuleName, DWPName)) Info = InfoOrErr.get(); else return InfoOrErr.takeError(); @@ -364,7 +364,8 @@ LLVMSymbolizer::getOrCreateObject(const std::string &Path, } Expected<SymbolizableModule *> -LLVMSymbolizer::getOrCreateModuleInfo(const std::string &ModuleName) { +LLVMSymbolizer::getOrCreateModuleInfo(const std::string &ModuleName, + StringRef DWPName) { const auto &I = Modules.find(ModuleName); if (I != Modules.end()) { return I->second.get(); @@ -409,7 +410,8 @@ LLVMSymbolizer::getOrCreateModuleInfo(const std::string &ModuleName) { } } if (!Context) - Context.reset(new DWARFContextInMemory(*Objects.second)); + Context = DWARFContext::create(*Objects.second, nullptr, + DWARFContext::defaultErrorHandler, DWPName); assert(Context); auto InfoOrErr = SymbolizableObjectFile::create(Objects.first, std::move(Context)); |
