diff options
author | Alexander Potapenko <glider@google.com> | 2014-09-03 07:11:34 +0000 |
---|---|---|
committer | Alexander Potapenko <glider@google.com> | 2014-09-03 07:11:34 +0000 |
commit | 33e4d9e9e3ee5392fbcd65c7df7bd7856a6f4df6 (patch) | |
tree | 3f3faa773f906b87cfe05dee2472e825ed8f8256 /llvm/tools/llvm-symbolizer/LLVMSymbolize.cpp | |
parent | 31e5b7fb1249378407dd726ff3fad7198a67aaee (diff) | |
download | bcm5719-llvm-33e4d9e9e3ee5392fbcd65c7df7bd7856a6f4df6.tar.gz bcm5719-llvm-33e4d9e9e3ee5392fbcd65c7df7bd7856a6f4df6.zip |
Fix PR20800: correctly calculate the offset of the subq instruction when generating compact unwind info.
This CL replaces the constant DarwinX86AsmBackend.PushInstrSize with a method
that lets the backend account for different sizes of "push %reg" instruction
sizes.
llvm-svn: 217020
Diffstat (limited to 'llvm/tools/llvm-symbolizer/LLVMSymbolize.cpp')
-rw-r--r-- | llvm/tools/llvm-symbolizer/LLVMSymbolize.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/llvm/tools/llvm-symbolizer/LLVMSymbolize.cpp b/llvm/tools/llvm-symbolizer/LLVMSymbolize.cpp index 2606beac17b..e3218608642 100644 --- a/llvm/tools/llvm-symbolizer/LLVMSymbolize.cpp +++ b/llvm/tools/llvm-symbolizer/LLVMSymbolize.cpp @@ -306,19 +306,26 @@ 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; @@ -335,8 +342,11 @@ LLVMSymbolizer::getOrCreateBinary(const std::string &Path) { } } } - if (!DbgBin) + errs() << "HERE: " << __FILE__ << ":" << __LINE__ << ", DbgBin: " << DbgBin << "\n"; + if (!DbgBin) { + errs() << "Failed to open DbgBin, falling back to Bin\n"; DbgBin = Bin; + } BinaryPair Res = std::make_pair(Bin, DbgBin); BinaryForPath[Path] = Res; return Res; |