[Lldb-commits] [lldb] r345956 - [Windows] Fix Windows build after be053dd5a384a03da5a77552686900ddc7bfc178
Aleksandr Urakov via lldb-commits
lldb-commits at lists.llvm.org
Fri Nov 2 01:47:33 PDT 2018
Author: aleksandr.urakov
Date: Fri Nov 2 01:47:33 2018
New Revision: 345956
URL: http://llvm.org/viewvc/llvm-project?rev=345956&view=rev
Log:
[Windows] Fix Windows build after be053dd5a384a03da5a77552686900ddc7bfc178
Modified:
lldb/trunk/source/Host/windows/FileSystem.cpp
lldb/trunk/source/Host/windows/Host.cpp
lldb/trunk/source/Host/windows/HostInfoWindows.cpp
lldb/trunk/source/Host/windows/HostProcessWindows.cpp
lldb/trunk/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
Modified: lldb/trunk/source/Host/windows/FileSystem.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/FileSystem.cpp?rev=345956&r1=345955&r2=345956&view=diff
==============================================================================
--- lldb/trunk/source/Host/windows/FileSystem.cpp (original)
+++ lldb/trunk/source/Host/windows/FileSystem.cpp Fri Nov 2 01:47:33 2018
@@ -75,7 +75,7 @@ Status FileSystem::Readlink(const FileSp
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;
Modified: lldb/trunk/source/Host/windows/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/Host.cpp?rev=345956&r1=345955&r2=345956&view=diff
==============================================================================
--- lldb/trunk/source/Host/windows/Host.cpp (original)
+++ lldb/trunk/source/Host/windows/Host.cpp Fri Nov 2 01:47:33 2018
@@ -84,7 +84,7 @@ void GetProcessExecutableAndTriple(const
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::GetModuleFileSpecForHostA
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 Proce
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);
Modified: lldb/trunk/source/Host/windows/HostInfoWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/HostInfoWindows.cpp?rev=345956&r1=345955&r2=345956&view=diff
==============================================================================
--- lldb/trunk/source/Host/windows/HostInfoWindows.cpp (original)
+++ lldb/trunk/source/Host/windows/HostInfoWindows.cpp Fri Nov 2 01:47:33 2018
@@ -92,7 +92,7 @@ FileSpec HostInfoWindows::GetProgramFile
::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::GetDefaultShel
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,
Modified: lldb/trunk/source/Host/windows/HostProcessWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/HostProcessWindows.cpp?rev=345956&r1=345955&r2=345956&view=diff
==============================================================================
--- lldb/trunk/source/Host/windows/HostProcessWindows.cpp (original)
+++ lldb/trunk/source/Host/windows/HostProcessWindows.cpp Fri Nov 2 01:47:33 2018
@@ -57,7 +57,7 @@ Status HostProcessWindows::GetMainModule
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
Modified: lldb/trunk/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Common/DebuggerThread.cpp?rev=345956&r1=345955&r2=345956&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/Common/DebuggerThread.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Windows/Common/DebuggerThread.cpp Fri Nov 2 01:47:33 2018
@@ -470,7 +470,7 @@ DebuggerThread::HandleLoadDllEvent(const
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);
Modified: lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp?rev=345956&r1=345955&r2=345956&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp Fri Nov 2 01:47:33 2018
@@ -252,11 +252,13 @@ Status ProcessWindows::DoLaunch(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
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);
More information about the lldb-commits
mailing list