From 7f6a7a37521e3610be7242ccec7ca9a15c1c307a Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Mon, 6 Mar 2017 23:42:14 +0000 Subject: Remove FileSpec::ReadFileContents. This functionality is subsumed by DataBufferLLVM, which is also more efficient since it will try to mmap. However, we don't yet support mmaping writable private sections, and in some cases we were using ReadFileContents and then modifying the buffer. To address that I've added a flag to the DataBufferLLVM methods that allow you to map privately, which disables the mmaping path entirely. Eventually we should teach DataBufferLLVM to use mmap with writable private, but that is orthogonal to this effort. Differential Revision: https://reviews.llvm.org/D30622 llvm-svn: 297095 --- lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp') diff --git a/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp b/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp index 352e33b1f36..f3f4664ad6e 100644 --- a/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp +++ b/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp @@ -53,7 +53,7 @@ lldb::ProcessSP ProcessMinidump::CreateInstance(lldb::TargetSP target_sp, // Read enough data for the Minidump header constexpr size_t header_size = sizeof(MinidumpHeader); auto DataPtr = - DataBufferLLVM::CreateFromPath(crash_file->GetPath(), header_size, 0); + DataBufferLLVM::CreateSliceFromPath(crash_file->GetPath(), header_size, 0); if (!DataPtr) return nullptr; @@ -65,7 +65,7 @@ lldb::ProcessSP ProcessMinidump::CreateInstance(lldb::TargetSP target_sp, if (header == nullptr) return nullptr; - auto AllData = DataBufferLLVM::CreateFromPath(crash_file->GetPath(), -1, 0); + auto AllData = DataBufferLLVM::CreateSliceFromPath(crash_file->GetPath(), -1, 0); if (!AllData) return nullptr; -- cgit v1.2.3