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 else begin
Debugger.FCatchesBreak.Disable; Debugger.FCatchesBreak.Disable;
Debugger.FPopExceptStack.Disable; Debugger.FPopExceptStack.Disable;
Instr := TLldbInstructionProcessStep.Create(FNextStepAction); Instr := TLldbInstructionProcessStep.Create(FNextStepAction, Debugger.FCurrentThreadId);
end; end;
Instr.OnFinish := @RunInstructionSucceeded; Instr.OnFinish := @RunInstructionSucceeded;
QueueInstruction(Instr); QueueInstruction(Instr);

View File

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