[Lldb-commits] [lldb] 83bea6d - Remove 'process launch failed:' message prefix in Target::Launch

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Fri Feb 14 18:45:27 PST 2020


Author: Jason Molenda
Date: 2020-02-14T18:42:38-08:00
New Revision: 83bea6d99dd17d893b7160e045700aef6173a49d

URL: https://github.com/llvm/llvm-project/commit/83bea6d99dd17d893b7160e045700aef6173a49d
DIFF: https://github.com/llvm/llvm-project/commit/83bea6d99dd17d893b7160e045700aef6173a49d.diff

LOG: Remove 'process launch failed:' message prefix in Target::Launch

SB API clients can describe the failure message in a more natural
way for their UI, this doesn't add information for them.

Differential Revision: https://reviews.llvm.org/D74585
<rdar://problem/49953304>

Added: 
    

Modified: 
    lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
    lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
    lldb/source/Target/Target.cpp
    lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py
    lldb/test/Shell/Process/Windows/launch_failure.yaml

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp b/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
index cea87c4d90ad..1e6f56e7867f 100644
--- a/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
+++ b/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
@@ -369,7 +369,7 @@ PlatformLinux::DebugProcess(ProcessLaunchInfo &launch_info, Debugger &debugger,
     } else
       LLDB_LOG(log, "not using process STDIO pty");
   } else {
-    LLDB_LOG(log, "process launch failed: {0}", error);
+    LLDB_LOG(log, "{0}", error);
     // FIXME figure out appropriate cleanup here.  Do we delete the target? Do
     // we delete the process?  Does our caller do that?
   }

diff  --git a/lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp b/lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
index 9942c339650e..16ec6c6122bd 100644
--- a/lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
+++ b/lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
@@ -338,7 +338,7 @@ PlatformNetBSD::DebugProcess(ProcessLaunchInfo &launch_info, Debugger &debugger,
     } else
       LLDB_LOG(log, "not using process STDIO pty");
   } else {
-    LLDB_LOG(log, "process launch failed: {0}", error);
+    LLDB_LOG(log, "{0}", error);
     // FIXME figure out appropriate cleanup here.  Do we delete the target? Do
     // we delete the process?  Does our caller do that?
   }

diff  --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index a8d4f24b1c72..9e41e90b6d7d 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -2957,11 +2957,6 @@ Status Target::Launch(ProcessLaunchInfo &launch_info, Stream *stream) {
       }
     }
     m_process_sp->RestoreProcessEvents();
-  } else {
-    Status error2;
-    error2.SetErrorStringWithFormat("process launch failed: %s",
-                                    error.AsCString());
-    error = error2;
   }
   return error;
 }

diff  --git a/lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py b/lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py
index 238a4559d6fb..9de0279bbfad 100644
--- a/lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py
+++ b/lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py
@@ -72,7 +72,7 @@ def A(self, packet):
         error = lldb.SBError()
         target.Launch(lldb.SBListener(), None, None, None, None, None,
                 None, 0, True, error)
-        self.assertEquals("process launch failed: 'A' packet returned an error: 71", error.GetCString())
+        self.assertEquals("'A' packet returned an error: 71", error.GetCString())
 
     def test_read_registers_using_g_packets(self):
         """Test reading registers using 'g' packets (default behavior)"""

diff  --git a/lldb/test/Shell/Process/Windows/launch_failure.yaml b/lldb/test/Shell/Process/Windows/launch_failure.yaml
index be723ef7621d..88cb0edd9f90 100644
--- a/lldb/test/Shell/Process/Windows/launch_failure.yaml
+++ b/lldb/test/Shell/Process/Windows/launch_failure.yaml
@@ -7,7 +7,7 @@
 # RUN: yaml2obj %s > %t.exe
 # RUN: %lldb %t.exe -o run 2>&1 | FileCheck %s
 
-# CHECK: error: process launch failed: unknown error
+# CHECK: error: unknown error
 
 --- !COFF
 OptionalHeader:


        


More information about the lldb-commits mailing list