[Lldb-commits] [lldb] r344409 - Resubmit "Add SymbolFileNativePDB plugin."

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 12 15:54:57 PDT 2018


Yea that part is clear, I just wonder what it's trying to parse.  It sounds
like an actual PDB file, because otherwise it shouldn't have made it that
far in the code.  But if it's an actual PDB file, it shouldn't be failing.

Anyway, the code definitely has a bug in that it doesn't correctly handle
failure, it's just strange that it's failing at all.  I'm about to check in
a fix to better handle failure.

On Fri, Oct 12, 2018 at 3:51 PM Jason Molenda <jmolenda at apple.com> wrote:

> Adrian suggests that parseFileHeaders is returning an error and that needs
> to be cleared?
>
>
> > On Oct 12, 2018, at 3:27 PM, Jason Molenda <jmolenda at apple.com> wrote:
> >
> > Ah, mystery solved.  The lit test specifies REQUIRES Darwin.
> >
> >> On Oct 12, 2018, at 3:22 PM, Jason Molenda <jmolenda at apple.com> wrote:
> >>
> >>
> >>
> >>> On Oct 12, 2018, at 12:47 PM, Zachary Turner via lldb-commits <
> lldb-commits at lists.llvm.org> wrote:
> >>>
> >>> Resubmit "Add SymbolFileNativePDB plugin."
> >>>
> >>> This was originally reverted due to some test failures on
> >>> Linux.  Those problems turned out to require several additional
> >>> patches to lld and clang in order to fix, which have since been
> >>> submitted.  This patch is resubmitted unchanged.  All tests now
> >>> pass on both Linux and Windows.
> >>
> >>
> >> The lit test in lit/Modules/lc_build_version.yaml fails on Darwin
> systems, crashing here -
> >>
> >> 4   lldb-test                        0x00000001008ebdab
> llvm::Error::fatalUncheckedError() const + 139
> >> 5   lldb-test                        0x000000010084b307
> llvm::Error::assertIsChecked() + 87 (Error.h:270)
> >> 6   lldb-test                        0x000000010084b279
> llvm::Error::~Error() + 25 (Error.h:230)
> >> 7   lldb-test                        0x0000000100844725
> llvm::Error::~Error() + 21 (Error.h:231)
> >> 8   lldb-test                        0x0000000101b91e49
> loadPDBFile(std::__1::basic_string<char, std::__1::char_traits<char>,
> std::__1::allocator<char> >,
> llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>&) + 1193
> (SymbolFileNativePDB.cpp:73)
> >> 9   lldb-test                        0x0000000101b9024e
> lldb_private::npdb::SymbolFileNativePDB::CalculateAbilities() + 542
> (SymbolFileNativePDB.cpp:187)
> >> 10  lldb-test                        0x0000000101060ceb
> lldb_private::SymbolFile::GetAbilities() + 43 (SymbolFile.h:87)
> >> 11  lldb-test                        0x00000001010607fc
> lldb_private::SymbolFile::FindPlugin(lldb_private::ObjectFile*) + 764
> (SymbolFile.cpp:58)
> >>
> >>
> >> Where the loadPDBFile line 73 is
> >>
> >>
> >>   59  static std::unique_ptr<PDBFile> loadPDBFile(std::string PdbPath,
> >>   60
> llvm::BumpPtrAllocator &Allocator) {
> >>   61    llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
> ErrorOrBuffer =
> >>   62        llvm::MemoryBuffer::getFile(PdbPath, /*FileSize=*/-1,
> >>   63
> /*RequiresNullTerminator=*/false);
> >>   64    if (!ErrorOrBuffer)
> >>   65      return nullptr;
> >>   66    std::unique_ptr<llvm::MemoryBuffer> Buffer =
> std::move(*ErrorOrBuffer);
> >>   67
> >>   68    llvm::StringRef Path = Buffer->getBufferIdentifier();
> >>   69    auto Stream = llvm::make_unique<llvm::MemoryBufferByteStream>(
> >>   70        std::move(Buffer), llvm::support::little);
> >>   71
> >>   72    auto File = llvm::make_unique<PDBFile>(Path, std::move(Stream),
> Allocator);
> >>   73    if (auto EC = File->parseFileHeaders())
> >>   74      return nullptr;
> >>   75    if (auto EC = File->parseStreamData())
> >>
> >>
> >> I'm not sure why this wouldn't fail on a linux/windows system.  The
> point of the .yaml lit tests was that it is host independent?
> >>
> >>
> >> J
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20181012/608b89b0/attachment-0001.html>


More information about the lldb-commits mailing list