From 10824e43e6584433b302b8d143589ddf8d0af4da Mon Sep 17 00:00:00 2001 From: martin Date: Sun, 3 Feb 2019 22:44:08 +0000 Subject: [PATCH] LazDebugger(Fp)Lldb: Fix stepping in the correct thread git-svn-id: trunk@60325 - --- .../lazdebuggerlldb/lldbdebugger.pas | 2 +- .../lazdebuggerlldb/lldbinstructions.pas | 23 +++++++++++++------ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/components/lazdebuggers/lazdebuggerlldb/lldbdebugger.pas b/components/lazdebuggers/lazdebuggerlldb/lldbdebugger.pas index 7aef9bb7e9..2000008863 100644 --- a/components/lazdebuggers/lazdebuggerlldb/lldbdebugger.pas +++ b/components/lazdebuggers/lazdebuggerlldb/lldbdebugger.pas @@ -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); diff --git a/components/lazdebuggers/lazdebuggerlldb/lldbinstructions.pas b/components/lazdebuggers/lazdebuggerlldb/lldbinstructions.pas index 67eb507e2b..6ae2fdae04 100644 --- a/components/lazdebuggers/lazdebuggerlldb/lldbinstructions.pas +++ b/components/lazdebuggers/lazdebuggerlldb/lldbinstructions.pas @@ -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;