Ah, mystery solved.  The lit test specifies REQUIRES Darwin.  

> On Oct 12, 2018, at 3:22 PM, Jason Molenda <jmole...@apple.com> wrote:
> 
> 
> 
>> On Oct 12, 2018, at 12:47 PM, Zachary Turner via lldb-commits 
>> <lldb-commits@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

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to