LazDebugger(Fp)Lldb: Fix stepping in the correct thread

git-svn-id: trunk@60325 -
This commit is contained in:
martin 2019-02-03 22:44:08 +00:00
parent 55cc4671b3
commit 10824e43e6
2 changed files with 17 additions and 8 deletions

View File

@ -1175,7 +1175,7 @@ begin
else begin
Debugger.FCatchesBreak.Disable;
Debugger.FPopExceptStack.Disable;
Instr := TLldbInstructionProcessStep.Create(FNextStepAction);
Instr := TLldbInstructionProcessStep.Create(FNextStepAction, Debugger.FCurrentThreadId);
end;
Instr.OnFinish := @RunInstructionSucceeded;
QueueInstruction(Instr);

View File

@ -133,7 +133,7 @@ type
protected
function ProcessInputFromDbg(const AData: String): Boolean; override;
public
constructor Create(AStepAction: TLldbInstructionProcessStepAction);
constructor Create(AStepAction: TLldbInstructionProcessStepAction; AThread: Integer = -1);
end;
{ TLldbInstructionProcessKill }
@ -713,15 +713,24 @@ begin
end;
constructor TLldbInstructionProcessStep.Create(
AStepAction: TLldbInstructionProcessStepAction);
AStepAction: TLldbInstructionProcessStepAction; AThread: Integer);
begin
case AStepAction of
saContinue: inherited Create('process continue');
saOver: inherited Create('thread step-over');
saInto: inherited Create('thread step-in');
saOut: inherited Create('thread step-out');
saInsIn: inherited Create ('thread step-inst');
saInsOver: inherited Create('thread step-inst-over');
(*
saOver: inherited Create('thread step-over', AThread);
saInto: inherited Create('thread step-in', AThread);
saOut: inherited Create('thread step-out', AThread);
saInsIn: inherited Create ('thread step-inst', AThread);
saInsOver: inherited Create('thread step-inst-over', AThread);
// *)
//(*
saOver: inherited Create(Format('thread step-over %d', [AThread]));
saInto: inherited Create(Format('thread step-in %d', [AThread]));
saOut: inherited Create(Format('thread step-out %d', [AThread]));
saInsIn: inherited Create (Format('thread step-inst %d', [AThread]));
saInsOver: inherited Create(Format('thread step-inst-over %d', [AThread]));
// *)
end;
end;