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

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


It's strange though, I wonder how it's even getting to this code path.  If
it makes it this far we've already confirmed that whatever the input is,
it's an actual PDB file.  So I don't know why it would fail to parse.

On Fri, Oct 12, 2018 at 3:29 PM Zachary Turner <zturner at google.com> wrote:

> I think we just need to add an llvm::consumeError(EC); on both of those
> lines before they return failure.  Sorry for missing this.
>
> On Fri, 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/3c99c79d/attachment.html>


More information about the lldb-commits mailing list