summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Target')
-rw-r--r--lldb/source/Target/ModuleCache.cpp6
-rw-r--r--lldb/source/Target/PathMappingList.cpp5
-rw-r--r--lldb/source/Target/Platform.cpp4
-rw-r--r--lldb/source/Target/Process.cpp2
-rw-r--r--lldb/source/Target/TargetList.cpp4
5 files changed, 11 insertions, 10 deletions
diff --git a/lldb/source/Target/ModuleCache.cpp b/lldb/source/Target/ModuleCache.cpp
index 4f4683290aa..b084c3aa0a1 100644
--- a/lldb/source/Target/ModuleCache.cpp
+++ b/lldb/source/Target/ModuleCache.cpp
@@ -133,7 +133,7 @@ Status CreateHostSysRootModuleLink(const FileSpec &root_dir_spec,
const auto sysroot_module_path_spec =
JoinPath(JoinPath(root_dir_spec, hostname),
platform_module_spec.GetPath().c_str());
- if (sysroot_module_path_spec.Exists()) {
+ if (FileSystem::Instance().Exists(sysroot_module_path_spec)) {
if (!delete_existing)
return Status();
@@ -225,7 +225,7 @@ Status ModuleCache::Get(const FileSpec &root_dir_spec, const char *hostname,
const auto module_file_path = JoinPath(
module_spec_dir, module_spec.GetFileSpec().GetFilename().AsCString());
- if (!module_file_path.Exists())
+ if (!FileSystem::Instance().Exists(module_file_path))
return Status("Module %s not found", module_file_path.GetPath().c_str());
if (FileSystem::Instance().GetByteSize(module_file_path) !=
module_spec.GetObjectSize())
@@ -253,7 +253,7 @@ Status ModuleCache::Get(const FileSpec &root_dir_spec, const char *hostname,
return error;
FileSpec symfile_spec = GetSymbolFileSpec(cached_module_sp->GetFileSpec());
- if (symfile_spec.Exists())
+ if (FileSystem::Instance().Exists(symfile_spec))
cached_module_sp->SetSymbolFileFileSpec(symfile_spec);
m_loaded_modules.insert(
diff --git a/lldb/source/Target/PathMappingList.cpp b/lldb/source/Target/PathMappingList.cpp
index 778728eebb0..2b9ebf305c1 100644
--- a/lldb/source/Target/PathMappingList.cpp
+++ b/lldb/source/Target/PathMappingList.cpp
@@ -14,12 +14,13 @@
// Other libraries and framework includes
// Project includes
-#include "lldb/lldb-private-enumerations.h"
+#include "lldb/Host/FileSystem.h"
#include "lldb/Host/PosixApi.h"
#include "lldb/Target/PathMappingList.h"
#include "lldb/Utility/FileSpec.h"
#include "lldb/Utility/Status.h"
#include "lldb/Utility/Stream.h"
+#include "lldb/lldb-private-enumerations.h"
using namespace lldb;
using namespace lldb_private;
@@ -219,7 +220,7 @@ bool PathMappingList::FindFile(const FileSpec &orig_spec,
new_spec.SetFile(pos->second.GetCString(), false,
FileSpec::Style::native);
new_spec.AppendPathComponent(orig_path + prefix_len);
- if (new_spec.Exists())
+ if (FileSystem::Instance().Exists(new_spec))
return true;
}
}
diff --git a/lldb/source/Target/Platform.cpp b/lldb/source/Target/Platform.cpp
index ff1cbce5209..4360d82ddd1 100644
--- a/lldb/source/Target/Platform.cpp
+++ b/lldb/source/Target/Platform.cpp
@@ -890,7 +890,7 @@ Platform::ResolveExecutable(const ModuleSpec &module_spec,
lldb::ModuleSP &exe_module_sp,
const FileSpecList *module_search_paths_ptr) {
Status error;
- if (module_spec.GetFileSpec().Exists()) {
+ if (FileSystem::Instance().Exists(module_spec.GetFileSpec())) {
if (module_spec.GetArchitecture().IsValid()) {
error = ModuleList::GetSharedModule(module_spec, exe_module_sp,
module_search_paths_ptr, nullptr,
@@ -921,7 +921,7 @@ Platform::ResolveExecutable(const ModuleSpec &module_spec,
Status Platform::ResolveSymbolFile(Target &target, const ModuleSpec &sym_spec,
FileSpec &sym_file) {
Status error;
- if (sym_spec.GetSymbolFileSpec().Exists())
+ if (FileSystem::Instance().Exists(sym_spec.GetSymbolFileSpec()))
sym_file = sym_spec.GetSymbolFileSpec();
else
error.SetErrorString("unable to resolve symbol file");
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 93b9e3f0b73..9ba10118b4c 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -2734,7 +2734,7 @@ Status Process::Launch(ProcessLaunchInfo &launch_info) {
sizeof(local_exec_file_path));
exe_module->GetPlatformFileSpec().GetPath(platform_exec_file_path,
sizeof(platform_exec_file_path));
- if (exe_module->GetFileSpec().Exists()) {
+ if (FileSystem::Instance().Exists(exe_module->GetFileSpec())) {
// Install anything that might need to be installed prior to launching.
// For host systems, this will do nothing, but if we are connected to a
// remote platform it will install any needed binaries
diff --git a/lldb/source/Target/TargetList.cpp b/lldb/source/Target/TargetList.cpp
index 34b1c7f398c..380ce0012d1 100644
--- a/lldb/source/Target/TargetList.cpp
+++ b/lldb/source/Target/TargetList.cpp
@@ -347,7 +347,7 @@ Status TargetList::CreateTargetInternal(Debugger &debugger,
arch = specified_arch;
FileSpec file(user_exe_path, false);
- if (!file.Exists() && user_exe_path.startswith("~")) {
+ if (!FileSystem::Instance().Exists(file) && user_exe_path.startswith("~")) {
// we want to expand the tilde but we don't want to resolve any symbolic
// links so we can't use the FileSpec constructor's resolve flag
llvm::SmallString<64> unglobbed_path;
@@ -372,7 +372,7 @@ Status TargetList::CreateTargetInternal(Debugger &debugger,
if (! llvm::sys::fs::current_path(cwd)) {
FileSpec cwd_file(cwd.c_str(), false);
cwd_file.AppendPathComponent(file);
- if (cwd_file.Exists())
+ if (FileSystem::Instance().Exists(cwd_file))
file = cwd_file;
}
}
OpenPOWER on IntegriCloud