diff options
author | Jim Ingham <jingham@apple.com> | 2013-01-31 21:46:01 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2013-01-31 21:46:01 +0000 |
commit | 93208b86800fde2dee054fcd7f52ef6d28dc9d44 (patch) | |
tree | f8070a57aec440ea1761f5b9ee667076ad0b11c7 /lldb/source/Commands/CommandObjectFrame.cpp | |
parent | 3145deac198ad23f86252632d9448c9eb5766b48 (diff) | |
download | llvm-93208b86800fde2dee054fcd7f52ef6d28dc9d44.zip llvm-93208b86800fde2dee054fcd7f52ef6d28dc9d44.tar.gz llvm-93208b86800fde2dee054fcd7f52ef6d28dc9d44.tar.bz2 |
Add "thread return -x" to unwind the innermost user called expression (if you happen to have stopped in it due to a crash.)
Make the message when you hit an crash while evaluating an expression a little clearer, and mention "thread return -x".
rdar://problem/13110464
llvm-svn: 174095
Diffstat (limited to 'lldb/source/Commands/CommandObjectFrame.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectFrame.cpp | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp index 6c3b245..18827315 100644 --- a/lldb/source/Commands/CommandObjectFrame.cpp +++ b/lldb/source/Commands/CommandObjectFrame.cpp @@ -261,33 +261,19 @@ protected: } } - const bool broadcast = true; - bool success = thread->SetSelectedFrameByIndex (frame_idx, broadcast); + bool success = thread->SetSelectedFrameByIndexNoisily (frame_idx, result.GetOutputStream()); if (success) { m_exe_ctx.SetFrameSP(thread->GetSelectedFrame ()); - StackFrame *frame = m_exe_ctx.GetFramePtr(); - if (frame) - { - bool already_shown = false; - SymbolContext frame_sc(frame->GetSymbolContext(eSymbolContextLineEntry)); - if (m_interpreter.GetDebugger().GetUseExternalEditor() && frame_sc.line_entry.file && frame_sc.line_entry.line != 0) - { - already_shown = Host::OpenFileInExternalEditor (frame_sc.line_entry.file, frame_sc.line_entry.line); - } - - bool show_frame_info = true; - bool show_source = !already_shown; - if (frame->GetStatus (result.GetOutputStream(), show_frame_info, show_source)) - { - result.SetStatus (eReturnStatusSuccessFinishResult); - return result.Succeeded(); - } - } + result.SetStatus (eReturnStatusSuccessFinishResult); + } + else + { + result.AppendErrorWithFormat ("Frame index (%u) out of range.\n", frame_idx); + result.SetStatus (eReturnStatusFailed); } - result.AppendErrorWithFormat ("Frame index (%u) out of range.\n", frame_idx); - result.SetStatus (eReturnStatusFailed); - return false; + + return result.Succeeded(); } protected: |