diff options
-rw-r--r-- | lldb/source/Host/windows/FileSystem.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Host/windows/Host.cpp | 6 | ||||
-rw-r--r-- | lldb/source/Host/windows/HostInfoWindows.cpp | 6 | ||||
-rw-r--r-- | lldb/source/Host/windows/HostProcessWindows.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp | 15 |
6 files changed, 18 insertions, 15 deletions
diff --git a/lldb/source/Host/windows/FileSystem.cpp b/lldb/source/Host/windows/FileSystem.cpp index 9309b89f2ba..3e9787d08e5 100644 --- a/lldb/source/Host/windows/FileSystem.cpp +++ b/lldb/source/Host/windows/FileSystem.cpp @@ -75,7 +75,7 @@ Status FileSystem::Readlink(const FileSpec &src, FileSpec &dst) { 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; diff --git a/lldb/source/Host/windows/Host.cpp b/lldb/source/Host/windows/Host.cpp index 452502d3372..a11a5994c7a 100644 --- a/lldb/source/Host/windows/Host.cpp +++ b/lldb/source/Host/windows/Host.cpp @@ -84,7 +84,7 @@ void GetProcessExecutableAndTriple(const AutoHandle &handle, 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); } @@ -123,7 +123,7 @@ FileSpec Host::GetModuleFileSpecForHostAddress(const void *host_addr) { 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; } @@ -146,7 +146,7 @@ uint32_t Host::FindProcesses(const ProcessInstanceInfoMatch &match_info, 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); diff --git a/lldb/source/Host/windows/HostInfoWindows.cpp b/lldb/source/Host/windows/HostInfoWindows.cpp index bd3f74f2e2f..2fde54b9f53 100644 --- a/lldb/source/Host/windows/HostInfoWindows.cpp +++ b/lldb/source/Host/windows/HostInfoWindows.cpp @@ -92,7 +92,7 @@ FileSpec HostInfoWindows::GetProgramFileSpec() { ::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; } @@ -103,9 +103,9 @@ FileSpec HostInfoWindows::GetDefaultShell() { 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, diff --git a/lldb/source/Host/windows/HostProcessWindows.cpp b/lldb/source/Host/windows/HostProcessWindows.cpp index ce75c14cdcf..701167ff6fe 100644 --- a/lldb/source/Host/windows/HostProcessWindows.cpp +++ b/lldb/source/Host/windows/HostProcessWindows.cpp @@ -57,7 +57,7 @@ Status HostProcessWindows::GetMainModule(FileSpec &file_spec) const { 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 diff --git a/lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp b/lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp index 65a0f0e793a..81ec25871c5 100644 --- a/lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp +++ b/lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp @@ -470,7 +470,7 @@ DebuggerThread::HandleLoadDllEvent(const LOAD_DLL_DEBUG_INFO &info, 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); diff --git a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp index 93f44113737..945b2ebabc4 100644 --- a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp +++ b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp @@ -252,11 +252,13 @@ Status ProcessWindows::DoLaunch(Module *exe_module, 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)) { @@ -904,7 +906,8 @@ void ProcessWindows::OnDebuggerConnected(lldb::addr_t image_base) { 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); |