[Lldb-commits] [PATCH] D74585: Don't prefix error message from process launch with "process launch failed:" boilerplate in Target::Launch
Jason Molenda via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Feb 13 18:37:29 PST 2020
jasonmolenda created this revision.
jasonmolenda added reviewers: jingham, clayborg, labath.
jasonmolenda added a project: LLDB.
Herald added a subscriber: krytarowski.
I wanted to put this up as a phab to collect any reactions instead of just landing it, I think it's not controversial but I could be wrong. Right now, Target::Launch() will prepend any error message with "process launch failed: ". This is a problem with a driver program using the SB API to launch a process on a remote system -- the wording "process launch failed:" makes some sense for the lldb command line driver, but the UI driving lldb may have a different way of describing the operation to the user -- for instance pressing the Run button in an UI. When we get back a meaningful error message about why the launch failed, prepending boilerplate like this makes it harder for a user to spot the error message.
It's a little annoying to test - on a native run, at least on macOS, our process launching doesn't go through Target::Process, CommandObjectProcessLaunch and SBTarget::Launch go through NativeProcessDarwin, there is no change in the error messaging in this case. I looked over PlatformLinux and PlatformNetBSD, they both seem to prefix their own "process launch failed: " strings; PlatformWindows overwrites the error message.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D74585
Files:
lldb/source/Target/Target.cpp
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;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74585.244558.patch
Type: text/x-patch
Size: 456 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200214/d5bfe419/attachment.bin>
More information about the lldb-commits
mailing list