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>
This commit is contained in:
Jason Molenda 2020-02-14 18:42:38 -08:00
parent 1cae2f9d19
commit 83bea6d99d
5 changed files with 4 additions and 9 deletions

View File

@ -369,7 +369,7 @@ PlatformLinux::DebugProcess(ProcessLaunchInfo &launch_info, Debugger &debugger,
} else } else
LLDB_LOG(log, "not using process STDIO pty"); LLDB_LOG(log, "not using process STDIO pty");
} else { } 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 // FIXME figure out appropriate cleanup here. Do we delete the target? Do
// we delete the process? Does our caller do that? // we delete the process? Does our caller do that?
} }

View File

@ -338,7 +338,7 @@ PlatformNetBSD::DebugProcess(ProcessLaunchInfo &launch_info, Debugger &debugger,
} else } else
LLDB_LOG(log, "not using process STDIO pty"); LLDB_LOG(log, "not using process STDIO pty");
} else { } 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 // FIXME figure out appropriate cleanup here. Do we delete the target? Do
// we delete the process? Does our caller do that? // we delete the process? Does our caller do that?
} }

View File

@ -2957,11 +2957,6 @@ Status Target::Launch(ProcessLaunchInfo &launch_info, Stream *stream) {
} }
} }
m_process_sp->RestoreProcessEvents(); m_process_sp->RestoreProcessEvents();
} else {
Status error2;
error2.SetErrorStringWithFormat("process launch failed: %s",
error.AsCString());
error = error2;
} }
return error; return error;
} }

View File

@ -72,7 +72,7 @@ class TestGDBRemoteClient(GDBRemoteTestBase):
error = lldb.SBError() error = lldb.SBError()
target.Launch(lldb.SBListener(), None, None, None, None, None, target.Launch(lldb.SBListener(), None, None, None, None, None,
None, 0, True, error) 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): def test_read_registers_using_g_packets(self):
"""Test reading registers using 'g' packets (default behavior)""" """Test reading registers using 'g' packets (default behavior)"""

View File

@ -7,7 +7,7 @@
# RUN: yaml2obj %s > %t.exe # RUN: yaml2obj %s > %t.exe
# RUN: %lldb %t.exe -o run 2>&1 | FileCheck %s # RUN: %lldb %t.exe -o run 2>&1 | FileCheck %s
# CHECK: error: process launch failed: unknown error # CHECK: error: unknown error
--- !COFF --- !COFF
OptionalHeader: OptionalHeader: