Skip to content

Commit 74d188d

Browse files
committed
Expose QueueThreadPlanForStepSingleInstruction function to SBThreadPlan
1 parent d5272e4 commit 74d188d

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

lldb/include/lldb/API/SBThreadPlan.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ class LLDB_API SBThreadPlan {
105105
SBThreadPlan QueueThreadPlanForStepOut(uint32_t frame_idx_to_step_to,
106106
bool first_insn, SBError &error);
107107

108+
SBThreadPlan QueueThreadPlanForStepSingleInstruction(bool step_over);
109+
SBThreadPlan QueueThreadPlanForStepSingleInstruction(bool step_over,
110+
SBError &error);
111+
108112
SBThreadPlan QueueThreadPlanForRunToAddress(SBAddress address);
109113
SBThreadPlan QueueThreadPlanForRunToAddress(SBAddress address,
110114
SBError &error);

lldb/source/API/SBThreadPlan.cpp

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,37 @@ SBThreadPlan::QueueThreadPlanForStepOut(uint32_t frame_idx_to_step_to,
325325
return SBThreadPlan();
326326
}
327327

328+
SBThreadPlan
329+
SBThreadPlan::QueueThreadPlanForStepSingleInstruction(bool step_over) {
330+
LLDB_INSTRUMENT_VA(this, step_over);
331+
332+
SBError error;
333+
return QueueThreadPlanForStepSingleInstruction(step_over, error);
334+
}
335+
336+
SBThreadPlan
337+
SBThreadPlan::QueueThreadPlanForStepSingleInstruction(bool step_over,
338+
SBError &error) {
339+
LLDB_INSTRUMENT_VA(this, step_over, error);
340+
341+
ThreadPlanSP thread_plan_sp(GetSP());
342+
if (thread_plan_sp) {
343+
Status plan_status;
344+
SBThreadPlan plan(
345+
thread_plan_sp->GetThread().QueueThreadPlanForStepSingleInstruction(
346+
step_over, false, false, plan_status));
347+
348+
if (plan_status.Fail())
349+
error.SetErrorString(plan_status.AsCString());
350+
else
351+
plan.GetSP()->SetPrivate(true);
352+
353+
return plan;
354+
}
355+
356+
return SBThreadPlan();
357+
}
358+
328359
SBThreadPlan
329360
SBThreadPlan::QueueThreadPlanForRunToAddress(SBAddress sb_address) {
330361
LLDB_INSTRUMENT_VA(this, sb_address);

0 commit comments

Comments
 (0)