[Lldb-commits] [lldb] r346109 - [LLDB] Fix FreeBSD/Darwin build
David Carlier via lldb-commits
lldb-commits at lists.llvm.org
Sun Nov 4 15:19:25 PST 2018
Author: devnexen
Date: Sun Nov 4 15:19:25 2018
New Revision: 346109
URL: http://llvm.org/viewvc/llvm-project?rev=346109&view=rev
Log:
[LLDB] Fix FreeBSD/Darwin build
Reviewers: JDevlieghere, tatyana-krasnukha
Reviwed By: tatyana-krasnukha
Differential Revision: https://reviews.llvm.org/D54084
Modified:
lldb/trunk/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp
lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
Modified: lldb/trunk/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp?rev=346109&r1=346108&r2=346109&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp Sun Nov 4 15:19:25 2018
@@ -63,12 +63,13 @@ Status NativeProcessProtocol::Launch(
// Verify the working directory is valid if one was specified.
FileSpec working_dir(launch_info.GetWorkingDirectory());
- if (working_dir &&
- (!working_dir.ResolvePath() ||
- !llvm::sys::fs::is_directory(working_dir.GetPath())) {
- error.SetErrorStringWithFormat("No such file or directory: %s",
+ if (working_dir) {
+ FileInstance::Instance().Resolve(working_dir);
+ if (!llvm::sys::fs::is_directory(working_dir.GetPath())) {
+ error.SetErrorStringWithFormat("No such file or directory: %s",
working_dir.GetCString());
- return error;
+ return error;
+ }
}
// Launch the inferior.
Modified: lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp?rev=346109&r1=346108&r2=346109&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp (original)
+++ lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp Sun Nov 4 15:19:25 2018
@@ -375,11 +375,13 @@ Status ProcessFreeBSD::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()))) {
- error.SetErrorStringWithFormat("No such file or directory: %s",
+ if (working_dir) {
+ FileSystem::Instance().Resolve(working_dir);
+ if (!fs::is_directory(working_dir.GetPath())) {
+ error.SetErrorStringWithFormat("No such file or directory: %s",
working_dir.GetCString());
- return error;
+ return error;
+ }
}
SetPrivateState(eStateLaunching);
More information about the lldb-commits
mailing list