diff options
author | Greg Clayton <gclayton@apple.com> | 2014-07-30 17:38:47 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2014-07-30 17:38:47 +0000 |
commit | 06357c930cc13f084e20fe1950a2c849aad22e39 (patch) | |
tree | 8abf5867fdcbc3795ec772495161d49d769726bd /lldb/source/Commands/CommandObjectProcess.cpp | |
parent | a12e023c8af35d5f9029d7484e180521e50f4a1f (diff) | |
download | llvm-06357c930cc13f084e20fe1950a2c849aad22e39.zip llvm-06357c930cc13f084e20fe1950a2c849aad22e39.tar.gz llvm-06357c930cc13f084e20fe1950a2c849aad22e39.tar.bz2 |
(no commit message)
llvm-svn: 214319
Diffstat (limited to 'lldb/source/Commands/CommandObjectProcess.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectProcess.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp index 3534df3..5dde4dd 100644 --- a/lldb/source/Commands/CommandObjectProcess.cpp +++ b/lldb/source/Commands/CommandObjectProcess.cpp @@ -536,6 +536,9 @@ protected: if (error.Success()) { + // Update the execution context so the current target and process are now selected + // in case we interrupt + m_interpreter.UpdateExecutionContext(NULL); ListenerSP listener_sp (new Listener("lldb.CommandObjectProcessAttach.DoExecute.attach.hijack")); m_options.attach_info.SetHijackListener(listener_sp); process->HijackProcessEvents(listener_sp.get()); @@ -557,7 +560,11 @@ protected: } else { - result.AppendError ("attach failed: process did not stop (no such process or permission problem?)"); + const char *exit_desc = process->GetExitDescription(); + if (exit_desc) + result.AppendErrorWithFormat ("attach failed: %s", exit_desc); + else + result.AppendError ("attach failed: process did not stop (no such process or permission problem?)"); process->Destroy(); result.SetStatus (eReturnStatusFailed); } |