diff options
author | Stephane Sezer <sas@cd80.net> | 2014-12-13 05:23:51 +0000 |
---|---|---|
committer | Stephane Sezer <sas@cd80.net> | 2014-12-13 05:23:51 +0000 |
commit | f2ef94e770e388add98d992e1c4d3eb365e21767 (patch) | |
tree | 9b4985de9694c2c40c7a1f258335faa0a5faab60 /lldb/source | |
parent | 1f7604d892bb817ede53a2b1c9559cdc72fa6e9c (diff) | |
download | bcm5719-llvm-f2ef94e770e388add98d992e1c4d3eb365e21767.tar.gz bcm5719-llvm-f2ef94e770e388add98d992e1c4d3eb365e21767.zip |
Make the platform process connect path less chatty.
Summary:
If a stream contains an empty string, no need to append it to the output
(otherwise we end up with a blank line). Also, no need to print a status
message when the state changes to connected, as this string brings no
information -- "Process 0" does not mean anything to the user, and the
process being connected has no meaning either.
Test Plan:
Connect to a remote linux platform mode daemon with `platform select
remote-linux` followed by `platform connect ...`, create a target and
run it, observe the output. Also, run the full test suite (dosep.py).
Before:
(lldb) [...] connect, etc.
(lldb) r
Process 0 connected
Process 5635 launched: '/Users/sas/Source/test' (x86_64)
Process 5635 stopped
After:
(lldb) [...] connect, etc.
(lldb) r
Process 5635 launched: '/Users/sas/Source/test' (x86_64)
Process 5635 stopped
Reviewers: tfiala, vharron, clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D6593
llvm-svn: 224188
Diffstat (limited to 'lldb/source')
-rw-r--r-- | lldb/source/Commands/CommandObjectProcess.cpp | 3 | ||||
-rw-r--r-- | lldb/source/Target/Process.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp index 897e39051f3..ec7b478fbec 100644 --- a/lldb/source/Commands/CommandObjectProcess.cpp +++ b/lldb/source/Commands/CommandObjectProcess.cpp @@ -268,7 +268,8 @@ protected: ProcessSP process_sp (target->GetProcessSP()); if (process_sp) { - if (stream.GetData()) + const char *data = stream.GetData(); + if (data && strlen(data) > 0) result.AppendMessage(stream.GetData()); result.AppendMessageWithFormat ("Process %" PRIu64 " launched: '%s' (%s)\n", process_sp->GetID(), exe_module_sp->GetFileSpec().GetPath().c_str(), archname); result.SetStatus (eReturnStatusSuccessFinishResult); diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index ab82db3a0de..207f07015a4 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -1044,7 +1044,6 @@ Process::HandleProcessStateChangedEvent (const EventSP &event_sp, { case eStateInvalid: case eStateUnloaded: - case eStateConnected: case eStateAttaching: case eStateLaunching: case eStateStepping: @@ -1060,6 +1059,7 @@ Process::HandleProcessStateChangedEvent (const EventSP &event_sp, } break; + case eStateConnected: case eStateRunning: // Don't be chatty when we run... break; |