diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-20 15:00:15 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-20 15:00:15 +0000 |
| commit | 763d4102c9736544f95a61d4d0a9a5be8c5a5df1 (patch) | |
| tree | b4a2965a49e80461fb52cd69d55f966058e7ef4d /contrib/llvm/tools/lldb/source/Target/ThreadPlanStepInstruction.cpp | |
| parent | 0e23b2ff8c430cd1145afb7bd55917c326bb1d06 (diff) | |
| parent | 94994d372d014ce4c8758b9605d63fae651bd8aa (diff) | |
Notes
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Target/ThreadPlanStepInstruction.cpp')
| -rw-r--r-- | contrib/llvm/tools/lldb/source/Target/ThreadPlanStepInstruction.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepInstruction.cpp b/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepInstruction.cpp index dd8f129a935b..7707454c9798 100644 --- a/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepInstruction.cpp +++ b/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepInstruction.cpp @@ -7,10 +7,6 @@ // //===----------------------------------------------------------------------===// -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes #include "lldb/Target/ThreadPlanStepInstruction.h" #include "lldb/Target/Process.h" #include "lldb/Target/RegisterContext.h" @@ -57,11 +53,19 @@ void ThreadPlanStepInstruction::SetUpState() { void ThreadPlanStepInstruction::GetDescription(Stream *s, lldb::DescriptionLevel level) { + auto PrintFailureIfAny = [&]() { + if (m_status.Success()) + return; + s->Printf(" failed (%s)", m_status.AsCString()); + }; + if (level == lldb::eDescriptionLevelBrief) { if (m_step_over) s->Printf("instruction step over"); else s->Printf("instruction step into"); + + PrintFailureIfAny(); } else { s->Printf("Stepping one instruction past "); s->Address(m_instruction_addr, sizeof(addr_t)); @@ -72,6 +76,8 @@ void ThreadPlanStepInstruction::GetDescription(Stream *s, s->Printf(" stepping over calls"); else s->Printf(" stepping into calls"); + + PrintFailureIfAny(); } } @@ -192,7 +198,8 @@ bool ThreadPlanStepInstruction::ShouldStop(Event *event_ptr) { // for now it is safer to run others. const bool stop_others = false; m_thread.QueueThreadPlanForStepOutNoShouldStop( - false, nullptr, true, stop_others, eVoteNo, eVoteNoOpinion, 0); + false, nullptr, true, stop_others, eVoteNo, eVoteNoOpinion, 0, + m_status); return false; } else { if (log) { |
