summaryrefslogtreecommitdiff
path: root/source/Target/ThreadPlanStepInstruction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Target/ThreadPlanStepInstruction.cpp')
-rw-r--r--source/Target/ThreadPlanStepInstruction.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/source/Target/ThreadPlanStepInstruction.cpp b/source/Target/ThreadPlanStepInstruction.cpp
index dd8f129a935b..7707454c9798 100644
--- a/source/Target/ThreadPlanStepInstruction.cpp
+++ b/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) {