summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Host')
-rw-r--r--lldb/source/Host/common/File.cpp4
-rw-r--r--lldb/source/Host/common/Host.cpp2
-rw-r--r--lldb/source/Host/common/Symbols.cpp2
-rw-r--r--lldb/source/Host/macosx/Symbols.cpp18
-rw-r--r--lldb/source/Host/macosx/objcxx/Host.mm7
-rw-r--r--lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm6
-rw-r--r--lldb/source/Host/posix/FileSystem.cpp2
7 files changed, 25 insertions, 16 deletions
diff --git a/lldb/source/Host/common/File.cpp b/lldb/source/Host/common/File.cpp
index 52fe6764699..3c3d55df220 100644
--- a/lldb/source/Host/common/File.cpp
+++ b/lldb/source/Host/common/File.cpp
@@ -315,7 +315,7 @@ Status File::GetFileSpec(FileSpec &file_spec) const {
if (::fcntl(GetDescriptor(), F_GETPATH, path) == -1)
error.SetErrorToErrno();
else
- file_spec.SetFile(path, false);
+ file_spec.SetFile(path, false, FileSpec::Style::native);
} else {
error.SetErrorString("invalid file handle");
}
@@ -330,7 +330,7 @@ Status File::GetFileSpec(FileSpec &file_spec) const {
error.SetErrorToErrno();
else {
path[len] = '\0';
- file_spec.SetFile(path, false);
+ file_spec.SetFile(path, false, FileSpec::Style::native);
}
}
#else
diff --git a/lldb/source/Host/common/Host.cpp b/lldb/source/Host/common/Host.cpp
index 1b779449b5f..53252258274 100644
--- a/lldb/source/Host/common/Host.cpp
+++ b/lldb/source/Host/common/Host.cpp
@@ -420,7 +420,7 @@ FileSpec Host::GetModuleFileSpecForHostAddress(const void *host_addr) {
Dl_info info;
if (::dladdr(host_addr, &info)) {
if (info.dli_fname)
- module_filespec.SetFile(info.dli_fname, true);
+ module_filespec.SetFile(info.dli_fname, true, FileSpec::Style::native);
}
#endif
return module_filespec;
diff --git a/lldb/source/Host/common/Symbols.cpp b/lldb/source/Host/common/Symbols.cpp
index 89bc1bd6ad7..d7e0c13112a 100644
--- a/lldb/source/Host/common/Symbols.cpp
+++ b/lldb/source/Host/common/Symbols.cpp
@@ -91,7 +91,7 @@ static bool LocateDSYMInVincinityOfExecutable(const ModuleSpec &module_spec,
::strncat(path, exec_fspec->GetFilename().AsCString(),
sizeof(path) - strlen(path) - 1);
- dsym_fspec.SetFile(path, false);
+ dsym_fspec.SetFile(path, false, FileSpec::Style::native);
ModuleSpecList module_specs;
ModuleSpec matched_module_spec;
diff --git a/lldb/source/Host/macosx/Symbols.cpp b/lldb/source/Host/macosx/Symbols.cpp
index 01f2714fe59..b82fea5ef3e 100644
--- a/lldb/source/Host/macosx/Symbols.cpp
+++ b/lldb/source/Host/macosx/Symbols.cpp
@@ -309,7 +309,8 @@ static bool GetModuleSpecInfoFromUUIDDictionary(CFDictionaryRef uuid_dict,
(CFDictionaryRef)uuid_dict, CFSTR("DBGSymbolRichExecutable"));
if (cf_str && CFGetTypeID(cf_str) == CFStringGetTypeID()) {
if (CFCString::FileSystemRepresentation(cf_str, str)) {
- module_spec.GetFileSpec().SetFile(str.c_str(), true);
+ module_spec.GetFileSpec().SetFile(str.c_str(), true,
+ FileSpec::Style::native);
if (log) {
log->Printf(
"From dsymForUUID plist: Symbol rich executable is at '%s'",
@@ -322,7 +323,8 @@ static bool GetModuleSpecInfoFromUUIDDictionary(CFDictionaryRef uuid_dict,
CFSTR("DBGDSYMPath"));
if (cf_str && CFGetTypeID(cf_str) == CFStringGetTypeID()) {
if (CFCString::FileSystemRepresentation(cf_str, str)) {
- module_spec.GetSymbolFileSpec().SetFile(str.c_str(), true);
+ module_spec.GetSymbolFileSpec().SetFile(str.c_str(), true,
+ FileSpec::Style::native);
success = true;
if (log) {
log->Printf("From dsymForUUID plist: dSYM is at '%s'", str.c_str());
@@ -504,12 +506,14 @@ bool Symbols::DownloadObjectAndSymbolFile(ModuleSpec &module_spec,
getenv("LLDB_APPLE_DSYMFORUUID_EXECUTABLE");
FileSpec dsym_for_uuid_exe_spec;
if (dsym_for_uuid_exe_path_cstr) {
- dsym_for_uuid_exe_spec.SetFile(dsym_for_uuid_exe_path_cstr, true);
+ dsym_for_uuid_exe_spec.SetFile(dsym_for_uuid_exe_path_cstr, true,
+ FileSpec::Style::native);
g_dsym_for_uuid_exe_exists = dsym_for_uuid_exe_spec.Exists();
}
if (!g_dsym_for_uuid_exe_exists) {
- dsym_for_uuid_exe_spec.SetFile("/usr/local/bin/dsymForUUID", false);
+ dsym_for_uuid_exe_spec.SetFile("/usr/local/bin/dsymForUUID", false,
+ FileSpec::Style::native);
g_dsym_for_uuid_exe_exists = dsym_for_uuid_exe_spec.Exists();
if (!g_dsym_for_uuid_exe_exists) {
long bufsize;
@@ -523,14 +527,16 @@ bool Symbols::DownloadObjectAndSymbolFile(ModuleSpec &module_spec,
tilde_rc && tilde_rc->pw_dir) {
std::string dsymforuuid_path(tilde_rc->pw_dir);
dsymforuuid_path += "/bin/dsymForUUID";
- dsym_for_uuid_exe_spec.SetFile(dsymforuuid_path.c_str(), false);
+ dsym_for_uuid_exe_spec.SetFile(dsymforuuid_path.c_str(), false,
+ FileSpec::Style::native);
g_dsym_for_uuid_exe_exists = dsym_for_uuid_exe_spec.Exists();
}
}
}
}
if (!g_dsym_for_uuid_exe_exists && g_dbgshell_command != NULL) {
- dsym_for_uuid_exe_spec.SetFile(g_dbgshell_command, true);
+ dsym_for_uuid_exe_spec.SetFile(g_dbgshell_command, true,
+ FileSpec::Style::native);
g_dsym_for_uuid_exe_exists = dsym_for_uuid_exe_spec.Exists();
}
diff --git a/lldb/source/Host/macosx/objcxx/Host.mm b/lldb/source/Host/macosx/objcxx/Host.mm
index f432a2f3f31..c8d441b72f0 100644
--- a/lldb/source/Host/macosx/objcxx/Host.mm
+++ b/lldb/source/Host/macosx/objcxx/Host.mm
@@ -105,7 +105,7 @@ bool Host::GetBundleDirectory(const FileSpec &file,
if (file.GetPath(path, sizeof(path))) {
CFCBundle bundle(path);
if (bundle.GetPath(path, sizeof(path))) {
- bundle_directory.SetFile(path, false);
+ bundle_directory.SetFile(path, false, FileSpec::Style::native);
return true;
}
}
@@ -125,7 +125,7 @@ bool Host::ResolveExecutableInBundle(FileSpec &file) {
if (url.get()) {
if (::CFURLGetFileSystemRepresentation(url.get(), YES, (UInt8 *)path,
sizeof(path))) {
- file.SetFile(path, false);
+ file.SetFile(path, false, FileSpec::Style::native);
return true;
}
}
@@ -542,7 +542,8 @@ static bool GetMacOSXProcessArgs(const ProcessInstanceInfoMatch *match_info_ptr,
triple_arch == llvm::Triple::x86_64);
const char *cstr = data.GetCStr(&offset);
if (cstr) {
- process_info.GetExecutableFile().SetFile(cstr, false);
+ process_info.GetExecutableFile().SetFile(cstr, false,
+ FileSpec::Style::native);
if (match_info_ptr == NULL ||
NameMatches(
diff --git a/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm b/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
index 7647e722536..dbb74822e78 100644
--- a/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+++ b/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
@@ -112,13 +112,15 @@ FileSpec HostInfoMacOSX::GetProgramFileSpec() {
uint32_t len = sizeof(program_fullpath);
int err = _NSGetExecutablePath(program_fullpath, &len);
if (err == 0)
- g_program_filespec.SetFile(program_fullpath, false);
+ g_program_filespec.SetFile(program_fullpath, false,
+ FileSpec::Style::native);
else if (err == -1) {
char *large_program_fullpath = (char *)::malloc(len + 1);
err = _NSGetExecutablePath(large_program_fullpath, &len);
if (err == 0)
- g_program_filespec.SetFile(large_program_fullpath, false);
+ g_program_filespec.SetFile(large_program_fullpath, false,
+ FileSpec::Style::native);
::free(large_program_fullpath);
}
diff --git a/lldb/source/Host/posix/FileSystem.cpp b/lldb/source/Host/posix/FileSystem.cpp
index df4884e55ec..60be642df60 100644
--- a/lldb/source/Host/posix/FileSystem.cpp
+++ b/lldb/source/Host/posix/FileSystem.cpp
@@ -47,7 +47,7 @@ Status FileSystem::Readlink(const FileSpec &src, FileSpec &dst) {
error.SetErrorToErrno();
else {
buf[count] = '\0'; // Success
- dst.SetFile(buf, false);
+ dst.SetFile(buf, false, FileSpec::Style::native);
}
return error;
}
OpenPOWER on IntegriCloud