[Lldb-commits] [PATCH] D74585: Don't prefix error message from process launch with "process launch failed:" boilerplate in Target::Launch

2020-02-14 Thread Jason Molenda via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG83bea6d99dd1: Remove process launch failed: 
message prefix in Target::Launch (authored by jasonmolenda).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74585/new/

https://reviews.llvm.org/D74585

Files:
  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


Index: lldb/test/Shell/Process/Windows/launch_failure.yaml
===
--- lldb/test/Shell/Process/Windows/launch_failure.yaml
+++ 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:
Index: lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py
===
--- lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py
+++ lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py
@@ -72,7 +72,7 @@
 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)"""
Index: lldb/source/Target/Target.cpp
===
--- lldb/source/Target/Target.cpp
+++ lldb/source/Target/Target.cpp
@@ -2957,11 +2957,6 @@
   }
 }
 m_process_sp->RestoreProcessEvents();
-  } else {
-Status error2;
-error2.SetErrorStringWithFormat("process launch failed: %s",
-error.AsCString());
-error = error2;
   }
   return error;
 }
Index: lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
===
--- lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
+++ lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
@@ -338,7 +338,7 @@
 } 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?
   }
Index: lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
===
--- lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
+++ lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
@@ -369,7 +369,7 @@
 } 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?
   }


Index: lldb/test/Shell/Process/Windows/launch_failure.yaml
===
--- lldb/test/Shell/Process/Windows/launch_failure.yaml
+++ 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:
Index: lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py
===
--- lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py
+++ lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py
@@ -72,7 +72,7 @@
 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)"""
Index: lldb/source/Target/Target.cpp
===
--- lldb/source/Target/Target.cpp
+++ lldb/source/Target/Target.cpp
@@ -2957,11 +2957,6 @@
   }
 }
 m_process_sp->RestoreProcessEvents();
-  } else {
-Status error2;
-

[Lldb-commits] [PATCH] D74585: Don't prefix error message from process launch with "process launch failed:" boilerplate in Target::Launch

2020-02-14 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 244799.
jasonmolenda added a comment.

Updated the test to match the new output (how did I miss that??), also for 
consistency removed the other occurrences of "process launch failed: " across 
lldb, two of which were only in log messages.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74585/new/

https://reviews.llvm.org/D74585

Files:
  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


Index: lldb/test/Shell/Process/Windows/launch_failure.yaml
===
--- lldb/test/Shell/Process/Windows/launch_failure.yaml
+++ 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:
Index: lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py
===
--- lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py
+++ lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py
@@ -72,7 +72,7 @@
 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)"""
Index: lldb/source/Target/Target.cpp
===
--- lldb/source/Target/Target.cpp
+++ lldb/source/Target/Target.cpp
@@ -2957,11 +2957,6 @@
   }
 }
 m_process_sp->RestoreProcessEvents();
-  } else {
-Status error2;
-error2.SetErrorStringWithFormat("process launch failed: %s",
-error.AsCString());
-error = error2;
   }
   return error;
 }
Index: lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
===
--- lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
+++ lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
@@ -338,7 +338,7 @@
 } 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?
   }
Index: lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
===
--- lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
+++ lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
@@ -369,7 +369,7 @@
 } 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?
   }


Index: lldb/test/Shell/Process/Windows/launch_failure.yaml
===
--- lldb/test/Shell/Process/Windows/launch_failure.yaml
+++ 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:
Index: lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py
===
--- lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py
+++ lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py
@@ -72,7 +72,7 @@
 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)"""
Index: lldb/source/Target/Target.cpp
===
--- lldb/source/Target/Target.cpp
+++ lldb/source/Target/Target.cpp
@@ -2957,11 +2957,6 @@
   }
 }
 m_process_sp->RestoreProcessEvents();
-  } else {
-

[Lldb-commits] [PATCH] D74585: Don't prefix error message from process launch with "process launch failed:" boilerplate in Target::Launch

2020-02-14 Thread Greg Clayton via Phabricator via lldb-commits
clayborg accepted this revision.
clayborg added a comment.

fine with me!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74585/new/

https://reviews.llvm.org/D74585



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D74585: Don't prefix error message from process launch with "process launch failed:" boilerplate in Target::Launch

2020-02-13 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.

I think this is fine.

I added a "gdb client" test for an attach failure error message a while back, 
so I was curious if the same thing can be done for launches -- it can and 
65e843c9  
has the result. I think that patch shows that we really should remove the 
prefix, since the equivalent "attach" error does not have any additional 
prefixes.

PS: Don't forget to update the new test before committing this. :)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74585/new/

https://reviews.llvm.org/D74585



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits