forked from OSchip/llvm-project
736888c84b
This is implemented by making a new FileSystem function: bool FileSystem::IsLocal(const FileSpec &spec) Then using this in a new function: DataBufferSP FileSpec::MemoryMapFileContentsIfLocal(off_t file_offset, size_t file_size) const; This function only mmaps data if the file is a local file since that means we can reliably page in data. We were experiencing crashes where people would use debug info files on network mounted file systems and that mount would go away and cause the next access to a page that wasn't paged in to crash LLDB. We now avoid this by just copying the data into a heap buffer and keeping a permanent copy to avoid the crash. Updated all previous users of FileSpec::MemoryMapFileContentsIfLocal() in ObjectFile subclasses over to use the new FileSpec::MemoryMapFileContentsIfLocal() function. <rdar://problem/19470249> llvm-svn: 230283 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
Makefile | ||
ObjectFilePECOFF.cpp | ||
ObjectFilePECOFF.h |