summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins')
-rw-r--r--lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp6
-rw-r--r--lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp5
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp3
-rw-r--r--lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp5
-rw-r--r--lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp5
-rw-r--r--lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp8
6 files changed, 18 insertions, 14 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
index 95daadface6..76eedb8f153 100644
--- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
@@ -36,6 +36,7 @@
#include "lldb/Target/Thread.h"
#include "lldb/Utility/Args.h"
#include "lldb/Utility/ConstString.h"
+#include "lldb/Utility/DataBufferLLVM.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/RegisterValue.h"
#include "lldb/Utility/RegularExpression.h"
@@ -2539,7 +2540,7 @@ bool RenderScriptRuntime::LoadAllocation(Stream &strm, const uint32_t alloc_id,
}
// Read file into data buffer
- auto data_sp = FileSystem::Instance().CreateDataBuffer(file.GetPath());
+ auto data_sp = DataBufferLLVM::CreateFromPath(file.GetPath());
// Cast start of buffer to FileHeader and use pointer to read metadata
void *file_buf = data_sp->GetBytes();
@@ -3080,8 +3081,7 @@ bool RSModuleDescriptor::ParseRSInfo() {
const addr_t size = info_sym->GetByteSize();
const FileSpec fs = m_module->GetFileSpec();
- auto buffer =
- FileSystem::Instance().CreateDataBuffer(fs.GetPath(), size, addr);
+ auto buffer = DataBufferLLVM::CreateSliceFromPath(fs.GetPath(), size, addr);
if (!buffer)
return false;
diff --git a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
index ae7409352c5..347870ec231 100644
--- a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
+++ b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
@@ -33,6 +33,7 @@ typedef struct ar_hdr {
#include "lldb/Host/FileSystem.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Utility/ArchSpec.h"
+#include "lldb/Utility/DataBufferLLVM.h"
#include "lldb/Utility/Stream.h"
#include "lldb/Utility/Timer.h"
@@ -312,7 +313,7 @@ ObjectContainer *ObjectContainerBSDArchive::CreateInstance(
// file gets updated by a new build while this .a file is being used for
// debugging
DataBufferSP archive_data_sp =
- FileSystem::Instance().CreateDataBuffer(*file, length, file_offset);
+ DataBufferLLVM::CreateSliceFromPath(file->GetPath(), length, file_offset);
if (!archive_data_sp)
return nullptr;
@@ -467,7 +468,7 @@ size_t ObjectContainerBSDArchive::GetModuleSpecifications(
if (!archive_sp) {
set_archive_arch = true;
data_sp =
- FileSystem::Instance().CreateDataBuffer(file, file_size, file_offset);
+ DataBufferLLVM::CreateSliceFromPath(file.GetPath(), file_size, file_offset);
if (data_sp) {
data.SetData(data_sp, 0, data_sp->GetByteSize());
archive_sp = Archive::ParseAndCacheArchiveForFile(
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
index c9359df7f9c..c287d14b67f 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
@@ -30,6 +30,7 @@
#include "lldb/Target/Platform.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/Target.h"
+#include "lldb/Utility/DataBufferLLVM.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/Status.h"
#include "lldb/Utility/Timer.h"
@@ -1166,7 +1167,7 @@ const char *PlatformDarwin::GetDeveloperDirectory() {
xcode_dir_path.append("/usr/share/xcode-select/xcode_dir_path");
temp_file_spec.SetFile(xcode_dir_path, FileSpec::Style::native);
auto dir_buffer =
- FileSystem::Instance().CreateDataBuffer(temp_file_spec.GetPath());
+ DataBufferLLVM::CreateFromPath(temp_file_spec.GetPath());
if (dir_buffer && dir_buffer->GetByteSize() > 0) {
llvm::StringRef path_ref(dir_buffer->GetChars());
// Trim tailing newlines and make sure there is enough room for a null
diff --git a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp
index 56e03ce1bff..f1e0f46a876 100644
--- a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp
+++ b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp
@@ -20,6 +20,7 @@
#include "lldb/Target/Target.h"
#include "lldb/Target/UnixSignals.h"
#include "lldb/Utility/DataBufferHeap.h"
+#include "lldb/Utility/DataBufferLLVM.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/State.h"
@@ -57,8 +58,8 @@ lldb::ProcessSP ProcessElfCore::CreateInstance(lldb::TargetSP target_sp,
// the header extension.
const size_t header_size = sizeof(llvm::ELF::Elf64_Ehdr);
- auto data_sp = FileSystem::Instance().CreateDataBuffer(
- crash_file->GetPath(), header_size, 0);
+ auto data_sp = DataBufferLLVM::CreateSliceFromPath(crash_file->GetPath(),
+ header_size, 0);
if (data_sp && data_sp->GetByteSize() == header_size &&
elf::ELFHeader::MagicBytesMatch(data_sp->GetBytes())) {
elf::ELFHeader elf_header;
diff --git a/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp b/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp
index bdb6a604118..c2098c1bef6 100644
--- a/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp
+++ b/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp
@@ -26,6 +26,7 @@
#include "lldb/Target/Target.h"
#include "lldb/Target/Thread.h"
#include "lldb/Utility/DataBuffer.h"
+#include "lldb/Utility/DataBufferLLVM.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/State.h"
@@ -62,8 +63,8 @@ lldb::ProcessSP ProcessMachCore::CreateInstance(lldb::TargetSP target_sp,
lldb::ProcessSP process_sp;
if (crash_file) {
const size_t header_size = sizeof(llvm::MachO::mach_header);
- auto data_sp = FileSystem::Instance().CreateDataBuffer(
- crash_file->GetPath(), header_size, 0);
+ auto data_sp =
+ DataBufferLLVM::CreateSliceFromPath(crash_file->GetPath(), header_size, 0);
if (data_sp && data_sp->GetByteSize() == header_size) {
DataExtractor data(data_sp, lldb::eByteOrderLittle, 4);
diff --git a/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp b/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp
index 97e13762270..b679199cb65 100644
--- a/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp
+++ b/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp
@@ -19,6 +19,7 @@
#include "lldb/Target/SectionLoadList.h"
#include "lldb/Target/Target.h"
#include "lldb/Target/UnixSignals.h"
+#include "lldb/Utility/DataBufferLLVM.h"
#include "lldb/Utility/LLDBAssert.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/State.h"
@@ -98,8 +99,8 @@ lldb::ProcessSP ProcessMinidump::CreateInstance(lldb::TargetSP target_sp,
lldb::ProcessSP process_sp;
// Read enough data for the Minidump header
constexpr size_t header_size = sizeof(MinidumpHeader);
- auto DataPtr = FileSystem::Instance().CreateDataBuffer(crash_file->GetPath(),
- header_size, 0);
+ auto DataPtr =
+ DataBufferLLVM::CreateSliceFromPath(crash_file->GetPath(), header_size, 0);
if (!DataPtr)
return nullptr;
@@ -111,8 +112,7 @@ lldb::ProcessSP ProcessMinidump::CreateInstance(lldb::TargetSP target_sp,
if (header == nullptr)
return nullptr;
- auto AllData =
- FileSystem::Instance().CreateDataBuffer(crash_file->GetPath(), -1, 0);
+ auto AllData = DataBufferLLVM::CreateSliceFromPath(crash_file->GetPath(), -1, 0);
if (!AllData)
return nullptr;
OpenPOWER on IntegriCloud