[Lldb-commits] [PATCH] D54084: [LLDB] Fix FreeBSD/Darwin build

David CARLIER via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sun Nov 4 15:21:56 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rLLDB346109: [LLDB] Fix FreeBSD/Darwin build (authored by devnexen, committed by ).

Repository:
  rLLDB LLDB

https://reviews.llvm.org/D54084

Files:
  source/Plugins/Process/Darwin/NativeProcessDarwin.cpp
  source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp


Index: source/Plugins/Process/Darwin/NativeProcessDarwin.cpp
===================================================================
--- source/Plugins/Process/Darwin/NativeProcessDarwin.cpp
+++ source/Plugins/Process/Darwin/NativeProcessDarwin.cpp
@@ -63,12 +63,13 @@
 
   // 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.
Index: source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
===================================================================
--- source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
+++ source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
@@ -375,11 +375,13 @@
 
   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);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54084.172537.patch
Type: text/x-patch
Size: 1829 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20181104/64280ec2/attachment.bin>


More information about the lldb-commits mailing list