else if (!llvm::convertWideToUTF8(buf.data(), path))
error.SetErrorString(PATH_CONVERSION_ERROR);
else
- dst.SetFile(path, false, FileSpec::Style::native);
+ dst.SetFile(path, FileSpec::Style::native);
::CloseHandle(h);
return error;
triple.setOS(llvm::Triple::Win32);
triple.setArch(llvm::Triple::UnknownArch);
if (GetExecutableForProcess(handle, executable)) {
- FileSpec executableFile(executable.c_str(), false);
+ FileSpec executableFile(executable.c_str());
process.SetExecutableFile(executableFile, true);
GetTripleForProcess(executableFile, triple);
}
std::string path;
if (!llvm::convertWideToUTF8(buffer.data(), path))
return module_filespec;
- module_filespec.SetFile(path, false, FileSpec::Style::native);
+ module_filespec.SetFile(path, FileSpec::Style::native);
return module_filespec;
}
ProcessInstanceInfo process;
std::string exeFile;
llvm::convertWideToUTF8(pe.szExeFile, exeFile);
- process.SetExecutableFile(FileSpec(exeFile, false), true);
+ process.SetExecutableFile(FileSpec(exeFile), true);
process.SetProcessID(pe.th32ProcessID);
process.SetParentProcessID(pe.th32ParentProcessID);
GetProcessExecutableAndTriple(handle, process);
::GetModuleFileNameW(NULL, buffer.data(), buffer.size());
std::string path;
llvm::convertWideToUTF8(buffer.data(), path);
- m_program_filespec.SetFile(path, false, FileSpec::Style::native);
+ m_program_filespec.SetFile(path, FileSpec::Style::native);
});
return m_program_filespec;
}
std::string shell;
if (GetEnvironmentVar("ComSpec", shell))
- return FileSpec(shell, false);
+ return FileSpec(shell);
- return FileSpec("C:\\Windows\\system32\\cmd.exe", false);
+ return FileSpec("C:\\Windows\\system32\\cmd.exe");
}
bool HostInfoWindows::GetEnvironmentVar(const std::string &var_name,
if (::GetProcessImageFileNameW(m_process, wpath.data(), wpath.size())) {
std::string path;
if (llvm::convertWideToUTF8(wpath.data(), path))
- file_spec.SetFile(path, false, FileSpec::Style::native);
+ file_spec.SetFile(path, FileSpec::Style::native);
else
error.SetErrorString("Error converting path to UTF-8");
} else
if (path_str.startswith("\\\\?\\"))
path += 4;
- FileSpec file_spec(path, false);
+ FileSpec file_spec(path);
ModuleSpec module_spec(file_spec);
lldb::addr_t load_addr = reinterpret_cast<lldb::addr_t>(info.lpBaseOfDll);
FileSpec working_dir = launch_info.GetWorkingDirectory();
namespace fs = llvm::sys::fs;
- if (working_dir && (!working_dir.ResolvePath() ||
- !fs::is_directory(working_dir.GetPath()))) {
- result.SetErrorStringWithFormat("No such file or directory: %s",
- working_dir.GetCString());
- return result;
+ if (working_dir) {
+ FileSystem::Instance().Resolve(working_dir);
+ if (!fs::is_directory(working_dir.GetPath())) {
+ result.SetErrorStringWithFormat("No such file or directory: %s",
+ working_dir.GetCString());
+ return result;
+ }
}
if (!launch_info.GetFlags().Test(eLaunchFlagDebug)) {
return;
}
- FileSpec executable_file(file_name, true);
+ FileSpec executable_file(file_name);
+ FileSystem::Instance().Resolve(executable_file);
ModuleSpec module_spec(executable_file);
Status error;
module = GetTarget().GetSharedModule(module_spec, &error);