mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Follow-up for r217020: actually commit the fix for PR20800,
revert the accidentally committed changes to LLVMSymbolize.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217021 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -306,26 +306,19 @@ LLVMSymbolizer::getOrCreateBinary(const std::string &Path) {
|
||||
// Check if it's a universal binary.
|
||||
Bin = ParsedBinary.getBinary().get();
|
||||
addOwningBinary(std::move(ParsedBinary));
|
||||
errs() << "HERE: " << __FILE__ << ":" << __LINE__ << ", DbgBin: " << DbgBin << "\n";
|
||||
if (Bin->isMachO() || Bin->isMachOUniversalBinary()) {
|
||||
// On Darwin we may find DWARF in separate object file in
|
||||
// resource directory.
|
||||
const std::string &ResourcePath =
|
||||
getDarwinDWARFResourceForPath(Path);
|
||||
errs() << "Resource path: " << ResourcePath << "\n";
|
||||
BinaryOrErr = createBinary(ResourcePath);
|
||||
std::error_code EC = BinaryOrErr.getError();
|
||||
errs() << "HERE: " << __FILE__ << ":" << __LINE__ << ", DbgBin: " << DbgBin << "\n";
|
||||
if (EC != errc::no_such_file_or_directory && !error(EC)) {
|
||||
errs() << "HERE: " << __FILE__ << ":" << __LINE__ << ", DbgBin: " << DbgBin << "\n";
|
||||
OwningBinary<Binary> B = std::move(BinaryOrErr.get());
|
||||
DbgBin = B.getBinary().get();
|
||||
addOwningBinary(std::move(B));
|
||||
}
|
||||
if (EC == errc::no_such_file_or_directory)
|
||||
errs() << "no_such_file_or_directory: " << ResourcePath << "\n";
|
||||
}
|
||||
errs() << "HERE: " << __FILE__ << ":" << __LINE__ << ", DbgBin: " << DbgBin << "\n";
|
||||
// Try to locate the debug binary using .gnu_debuglink section.
|
||||
if (!DbgBin) {
|
||||
std::string DebuglinkName;
|
||||
@ -342,11 +335,8 @@ LLVMSymbolizer::getOrCreateBinary(const std::string &Path) {
|
||||
}
|
||||
}
|
||||
}
|
||||
errs() << "HERE: " << __FILE__ << ":" << __LINE__ << ", DbgBin: " << DbgBin << "\n";
|
||||
if (!DbgBin) {
|
||||
errs() << "Failed to open DbgBin, falling back to Bin\n";
|
||||
if (!DbgBin)
|
||||
DbgBin = Bin;
|
||||
}
|
||||
BinaryPair Res = std::make_pair(Bin, DbgBin);
|
||||
BinaryForPath[Path] = Res;
|
||||
return Res;
|
||||
|
Reference in New Issue
Block a user