diff options
author | Todd Fiala <todd.fiala@gmail.com> | 2014-10-07 16:05:21 +0000 |
---|---|---|
committer | Todd Fiala <todd.fiala@gmail.com> | 2014-10-07 16:05:21 +0000 |
commit | f72fa67fc35622a8cd18a2fffd979fb225d82400 (patch) | |
tree | c846dd21765b642546df668dc4540a203474abe6 /lldb/source/Target | |
parent | 0551065cd179740a54e20fea6d854e543c0dd5bd (diff) | |
download | bcm5719-llvm-f72fa67fc35622a8cd18a2fffd979fb225d82400.tar.gz bcm5719-llvm-f72fa67fc35622a8cd18a2fffd979fb225d82400.zip |
Fix spurious output to command line when launching a process on Linux.
See http://reviews.llvm.org/D5632 for details.
Change by Shawn Best.
llvm-svn: 219213
Diffstat (limited to 'lldb/source/Target')
-rw-r--r-- | lldb/source/Target/Process.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 4845b45afb8..4de1a5bd967 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -2838,9 +2838,12 @@ Process::Launch (ProcessLaunchInfo &launch_info) system_runtime->DidLaunch(); m_os_ap.reset (OperatingSystem::FindPlugin (this, NULL)); - // This delays passing the stopped event to listeners till DidLaunch gets - // a chance to complete... - HandlePrivateEvent (event_sp); + + // Note, the stop event was consumed above, but not handled. This was done + // to give DidLaunch a chance to run. The target is either stopped or crashed. + // Directly set the state. This is done to prevent a stop message with a bunch + // of spurious output on thread status, as well as not pop a ProcessIOHandler. + SetPublicState(state, false); if (PrivateStateThreadIsValid ()) ResumePrivateStateThread (); @@ -4029,7 +4032,8 @@ Process::HandlePrivateEvent (EventSP &event_sp) { // Only push the input handler if we aren't fowarding events, // as this means the curses GUI is in use... - if (!GetTarget().GetDebugger().IsForwardingEvents()) + // Or don't push it if we are launching since it will come up stopped. + if (!GetTarget().GetDebugger().IsForwardingEvents() && new_state != eStateLaunching) PushProcessIOHandler (); m_iohandler_sync.SetValue(true, eBroadcastAlways); } |