diff options
Diffstat (limited to 'lldb/source/Target/ThreadPlanStepInstruction.cpp')
-rw-r--r-- | lldb/source/Target/ThreadPlanStepInstruction.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lldb/source/Target/ThreadPlanStepInstruction.cpp b/lldb/source/Target/ThreadPlanStepInstruction.cpp index b2cecf3a121..7707454c979 100644 --- a/lldb/source/Target/ThreadPlanStepInstruction.cpp +++ b/lldb/source/Target/ThreadPlanStepInstruction.cpp @@ -53,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)); @@ -68,6 +76,8 @@ void ThreadPlanStepInstruction::GetDescription(Stream *s, s->Printf(" stepping over calls"); else s->Printf(" stepping into calls"); + + PrintFailureIfAny(); } } @@ -188,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) { |