diff options
author | Ed Maste <emaste@FreeBSD.org> | 2015-02-06 22:25:21 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2015-02-06 22:25:21 +0000 |
commit | 7aa51b7949660007cdf82cd56e16df87703f9319 (patch) | |
tree | 5e5b6a0774e0d93bb4cfa2f9f83b9c41b38c4448 /contrib/llvm/tools/lldb/source/Commands/CommandObjectProcess.cpp | |
parent | bd9cc051b34cdcd5148e03e92ed404a0587bacff (diff) | |
parent | 205afe679855a4ce8149cdaa94d3f0868ce796dc (diff) |
Update LLDB snapshot to upstream r225923 (git 2b588ecd)
Sponsored by: DARPA, AFRL
Notes
Notes:
svn path=/projects/clang360-import/; revision=278334
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Commands/CommandObjectProcess.cpp')
-rw-r--r-- | contrib/llvm/tools/lldb/source/Commands/CommandObjectProcess.cpp | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/contrib/llvm/tools/lldb/source/Commands/CommandObjectProcess.cpp b/contrib/llvm/tools/lldb/source/Commands/CommandObjectProcess.cpp index 6536c6ef1693..ec7b478fbecc 100644 --- a/contrib/llvm/tools/lldb/source/Commands/CommandObjectProcess.cpp +++ b/contrib/llvm/tools/lldb/source/Commands/CommandObjectProcess.cpp @@ -258,8 +258,9 @@ protected: // Save the arguments for subsequent runs in the current target. target->SetRunArguments (launch_args); } - - Error error = target->Launch(debugger.GetListener(), m_options.launch_info); + + StreamString stream; + Error error = target->Launch(m_options.launch_info, &stream); if (error.Success()) { @@ -267,6 +268,9 @@ protected: ProcessSP process_sp (target->GetProcessSP()); if (process_sp) { + 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); result.SetDidChangeProcessState (true); @@ -564,15 +568,18 @@ protected: if (error.Success()) { result.SetStatus (eReturnStatusSuccessContinuingNoResult); - StateType state = process->WaitForProcessToStop (NULL, NULL, false, listener_sp.get()); + StreamString stream; + StateType state = process->WaitForProcessToStop (NULL, NULL, false, listener_sp.get(), &stream); process->RestoreProcessEvents(); result.SetDidChangeProcessState (true); + if (stream.GetData()) + result.AppendMessage(stream.GetData()); + if (state == eStateStopped) { - result.AppendMessageWithFormat ("Process %" PRIu64 " %s\n", process->GetID(), StateAsCString (state)); result.SetStatus (eReturnStatusSuccessFinishNoResult); } else @@ -791,7 +798,12 @@ protected: } } - Error error(process->Resume()); + StreamString stream; + Error error; + if (synchronous_execution) + error = process->ResumeSynchronous (&stream); + else + error = process->Resume (); if (error.Success()) { @@ -803,10 +815,11 @@ protected: result.AppendMessageWithFormat ("Process %" PRIu64 " resuming\n", process->GetID()); if (synchronous_execution) { - state = process->WaitForProcessToStop (NULL); + // If any state changed events had anything to say, add that to the result + if (stream.GetData()) + result.AppendMessage(stream.GetData()); result.SetDidChangeProcessState (true); - result.AppendMessageWithFormat ("Process %" PRIu64 " %s\n", process->GetID(), StateAsCString (state)); result.SetStatus (eReturnStatusSuccessFinishNoResult); } else |