[Lldb-commits] [lldb] r334664 - [FileSpec] Make style argument mandatory for SetFile. NFC
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Wed Jun 13 15:23:48 PDT 2018
Author: jdevlieghere
Date: Wed Jun 13 15:23:48 2018
New Revision: 334664
URL: http://llvm.org/viewvc/llvm-project?rev=334664&view=rev
Log:
[FileSpec] Make style argument mandatory for SetFile. NFC
Fix SetFile uses in hosts that I missed in r334663.
Modified:
lldb/trunk/source/Host/freebsd/Host.cpp
lldb/trunk/source/Host/freebsd/HostInfoFreeBSD.cpp
lldb/trunk/source/Host/linux/Host.cpp
lldb/trunk/source/Host/linux/HostInfoLinux.cpp
lldb/trunk/source/Host/netbsd/Host.cpp
lldb/trunk/source/Host/netbsd/HostInfoNetBSD.cpp
lldb/trunk/source/Host/openbsd/Host.cpp
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
Modified: lldb/trunk/source/Host/freebsd/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/freebsd/Host.cpp?rev=334664&r1=334663&r2=334664&view=diff
==============================================================================
--- lldb/trunk/source/Host/freebsd/Host.cpp (original)
+++ lldb/trunk/source/Host/freebsd/Host.cpp Wed Jun 13 15:23:48 2018
@@ -75,9 +75,11 @@ GetFreeBSDProcessArgs(const ProcessInsta
size_t pathname_len = sizeof(pathname);
mib[2] = KERN_PROC_PATHNAME;
if (::sysctl(mib, 4, pathname, &pathname_len, NULL, 0) == 0)
- process_info.GetExecutableFile().SetFile(pathname, false);
+ process_info.GetExecutableFile().SetFile(pathname, false,
+ FileSpec::Style::native);
else
- process_info.GetExecutableFile().SetFile(cstr, false);
+ process_info.GetExecutableFile().SetFile(cstr, false,
+ FileSpec::Style::native);
if (!(match_info_ptr == NULL ||
NameMatches(process_info.GetExecutableFile().GetFilename().GetCString(),
Modified: lldb/trunk/source/Host/freebsd/HostInfoFreeBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/freebsd/HostInfoFreeBSD.cpp?rev=334664&r1=334663&r2=334664&view=diff
==============================================================================
--- lldb/trunk/source/Host/freebsd/HostInfoFreeBSD.cpp (original)
+++ lldb/trunk/source/Host/freebsd/HostInfoFreeBSD.cpp Wed Jun 13 15:23:48 2018
@@ -68,7 +68,7 @@ FileSpec HostInfoFreeBSD::GetProgramFile
if (sysctl(exe_path_mib, 4, NULL, &exe_path_size, NULL, 0) == 0) {
char *exe_path = new char[exe_path_size];
if (sysctl(exe_path_mib, 4, exe_path, &exe_path_size, NULL, 0) == 0)
- g_program_filespec.SetFile(exe_path, false);
+ g_program_filespec.SetFile(exe_path, false, FileSpec::Style::native);
delete[] exe_path;
}
}
Modified: lldb/trunk/source/Host/linux/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/linux/Host.cpp?rev=334664&r1=334663&r2=334664&view=diff
==============================================================================
--- lldb/trunk/source/Host/linux/Host.cpp (original)
+++ lldb/trunk/source/Host/linux/Host.cpp Wed Jun 13 15:23:48 2018
@@ -190,7 +190,8 @@ static bool GetProcessAndStatInfo(::pid_
return false;
process_info.SetProcessID(pid);
- process_info.GetExecutableFile().SetFile(PathRef, false);
+ process_info.GetExecutableFile().SetFile(PathRef, false,
+ FileSpec::Style::native);
llvm::StringRef Rest = Environ->getBuffer();
while (!Rest.empty()) {
Modified: lldb/trunk/source/Host/linux/HostInfoLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/linux/HostInfoLinux.cpp?rev=334664&r1=334663&r2=334664&view=diff
==============================================================================
--- lldb/trunk/source/Host/linux/HostInfoLinux.cpp (original)
+++ lldb/trunk/source/Host/linux/HostInfoLinux.cpp Wed Jun 13 15:23:48 2018
@@ -187,7 +187,7 @@ FileSpec HostInfoLinux::GetProgramFileSp
ssize_t len = readlink("/proc/self/exe", exe_path, sizeof(exe_path) - 1);
if (len > 0) {
exe_path[len] = 0;
- g_program_filespec.SetFile(exe_path, false);
+ g_program_filespec.SetFile(exe_path, false, FileSpec::Style::native);
}
}
Modified: lldb/trunk/source/Host/netbsd/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/netbsd/Host.cpp?rev=334664&r1=334663&r2=334664&view=diff
==============================================================================
--- lldb/trunk/source/Host/netbsd/Host.cpp (original)
+++ lldb/trunk/source/Host/netbsd/Host.cpp Wed Jun 13 15:23:48 2018
@@ -70,7 +70,8 @@ static bool GetNetBSDProcessArgs(const P
if (!cstr)
return false;
- process_info.GetExecutableFile().SetFile(cstr, false);
+ process_info.GetExecutableFile().SetFile(cstr, false,
+ FileSpec::Style::native);
if (!(match_info_ptr == NULL ||
NameMatches(process_info.GetExecutableFile().GetFilename().GetCString(),
Modified: lldb/trunk/source/Host/netbsd/HostInfoNetBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/netbsd/HostInfoNetBSD.cpp?rev=334664&r1=334663&r2=334664&view=diff
==============================================================================
--- lldb/trunk/source/Host/netbsd/HostInfoNetBSD.cpp (original)
+++ lldb/trunk/source/Host/netbsd/HostInfoNetBSD.cpp Wed Jun 13 15:23:48 2018
@@ -89,7 +89,7 @@ FileSpec HostInfoNetBSD::GetProgramFileS
len = sizeof(path);
if (sysctl(name, __arraycount(name), path, &len, NULL, 0) != -1) {
- g_program_filespec.SetFile(path, false);
+ g_program_filespec.SetFile(path, false, FileSpec::Style::native);
}
}
return g_program_filespec;
Modified: lldb/trunk/source/Host/openbsd/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/openbsd/Host.cpp?rev=334664&r1=334663&r2=334664&view=diff
==============================================================================
--- lldb/trunk/source/Host/openbsd/Host.cpp (original)
+++ lldb/trunk/source/Host/openbsd/Host.cpp Wed Jun 13 15:23:48 2018
@@ -72,7 +72,8 @@ GetOpenBSDProcessArgs(const ProcessInsta
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(
Modified: lldb/trunk/source/Host/windows/FileSystem.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/FileSystem.cpp?rev=334664&r1=334663&r2=334664&view=diff
==============================================================================
--- lldb/trunk/source/Host/windows/FileSystem.cpp (original)
+++ lldb/trunk/source/Host/windows/FileSystem.cpp Wed Jun 13 15:23:48 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);
+ dst.SetFile(path, false, 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=334664&r1=334663&r2=334664&view=diff
==============================================================================
--- lldb/trunk/source/Host/windows/Host.cpp (original)
+++ lldb/trunk/source/Host/windows/Host.cpp Wed Jun 13 15:23:48 2018
@@ -122,7 +122,7 @@ FileSpec Host::GetModuleFileSpecForHostA
std::string path;
if (!llvm::convertWideToUTF8(buffer.data(), path))
return module_filespec;
- module_filespec.SetFile(path, false);
+ module_filespec.SetFile(path, false, FileSpec::Style::native);
return module_filespec;
}
Modified: lldb/trunk/source/Host/windows/HostInfoWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/HostInfoWindows.cpp?rev=334664&r1=334663&r2=334664&view=diff
==============================================================================
--- lldb/trunk/source/Host/windows/HostInfoWindows.cpp (original)
+++ lldb/trunk/source/Host/windows/HostInfoWindows.cpp Wed Jun 13 15:23:48 2018
@@ -97,7 +97,7 @@ FileSpec HostInfoWindows::GetProgramFile
::GetModuleFileNameW(NULL, buffer.data(), buffer.size());
std::string path;
llvm::convertWideToUTF8(buffer.data(), path);
- m_program_filespec.SetFile(path, false);
+ m_program_filespec.SetFile(path, false, FileSpec::Style::native);
});
return m_program_filespec;
}
Modified: lldb/trunk/source/Host/windows/HostProcessWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/HostProcessWindows.cpp?rev=334664&r1=334663&r2=334664&view=diff
==============================================================================
--- lldb/trunk/source/Host/windows/HostProcessWindows.cpp (original)
+++ lldb/trunk/source/Host/windows/HostProcessWindows.cpp Wed Jun 13 15:23:48 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);
+ file_spec.SetFile(path, false, FileSpec::Style::native);
else
error.SetErrorString("Error converting path to UTF-8");
} else
More information about the lldb-commits
mailing list