@@ -31,24 +31,26 @@ namespace lldb_dap {
3131// possible targets for a given source line can be retrieved via the
3232// `stepInTargets` request.
3333Error StepInRequestHandler::Run (const StepInArguments &args) const {
34- std::string step_in_target;
35- auto it = dap.step_in_targets .find (args.targetId .value_or (0 ));
36- if (it != dap.step_in_targets .end ())
37- step_in_target = it->second ;
38-
39- RunMode run_mode = args.singleThread ? eOnlyThisThread : eOnlyDuringStepping;
4034 SBThread thread = dap.GetLLDBThread (args.threadId );
4135 if (!thread.IsValid ())
4236 return make_error<DAPError>(" invalid thread" );
4337
4438 // Remember the thread ID that caused the resume so we can set the
4539 // "threadCausedFocus" boolean value in the "stopped" events.
4640 dap.focus_tid = thread.GetThreadID ();
41+
4742 if (args.granularity == eSteppingGranularityInstruction) {
4843 thread.StepInstruction (/* step_over=*/ false );
49- } else {
50- thread.StepInto (step_in_target.c_str (), run_mode);
44+ return Error::success ();
5145 }
46+
47+ std::string step_in_target;
48+ auto it = dap.step_in_targets .find (args.targetId .value_or (0 ));
49+ if (it != dap.step_in_targets .end ())
50+ step_in_target = it->second ;
51+
52+ RunMode run_mode = args.singleThread ? eOnlyThisThread : eOnlyDuringStepping;
53+ thread.StepInto (step_in_target.c_str (), run_mode);
5254 return Error::success ();
5355}
5456
0 commit comments