diff options
| author | David Carlier <devnexen@gmail.com> | 2018-11-04 23:19:25 +0000 |
|---|---|---|
| committer | David Carlier <devnexen@gmail.com> | 2018-11-04 23:19:25 +0000 |
| commit | 511e1cf1ef2a156e38e00003759074ba73484204 (patch) | |
| tree | 5603658df4141354c05da3076da1bf6dc9a7adb4 | |
| parent | d2a895a9720e32e2f52e1ce10d2ba4769a034aa2 (diff) | |
| download | bcm5719-llvm-511e1cf1ef2a156e38e00003759074ba73484204.tar.gz bcm5719-llvm-511e1cf1ef2a156e38e00003759074ba73484204.zip | |
[LLDB] Fix FreeBSD/Darwin build
Reviewers: JDevlieghere, tatyana-krasnukha
Reviwed By: tatyana-krasnukha
Differential Revision: https://reviews.llvm.org/D54084
llvm-svn: 346109
| -rw-r--r-- | lldb/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp | 11 | ||||
| -rw-r--r-- | lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp | 10 |
2 files changed, 12 insertions, 9 deletions
diff --git a/lldb/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp b/lldb/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp index 557de955de8..977da2f0ecc 100644 --- a/lldb/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp +++ b/lldb/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp @@ -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. diff --git a/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp b/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp index a1ee5314d4c..a23f54b7d72 100644 --- a/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp +++ b/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp @@ -375,11 +375,13 @@ Status ProcessFreeBSD::DoLaunch(Module *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); |

