LazDebugger(Fp)Lldb: fix correct stackframe/thread for registers

git-svn-id: trunk@60004 -
This commit is contained in:
martin 2019-01-05 15:25:30 +00:00
parent 0f75fd5454
commit c5cd6d5335
2 changed files with 9 additions and 4 deletions

View File

@ -1237,11 +1237,16 @@ end;
procedure TLldbDebuggerCommandLocals.DoExecute; procedure TLldbDebuggerCommandLocals.DoExecute;
begin begin
if FLocals = nil then begin
Finished;
exit;
end;
if FLocalsInstr <> nil then begin if FLocalsInstr <> nil then begin
FLocalsInstr.OnFinish := nil; FLocalsInstr.OnFinish := nil;
ReleaseRefAndNil(FLocalsInstr); ReleaseRefAndNil(FLocalsInstr);
end; end;
FLocalsInstr := TLldbInstructionLocals.Create(); FLocalsInstr := TLldbInstructionLocals.Create(FLocals.ThreadId, FLocals.StackFrame);
FLocalsInstr.OnFinish := @LocalsInstructionFinished; FLocalsInstr.OnFinish := @LocalsInstructionFinished;
QueueInstruction(FLocalsInstr); QueueInstruction(FLocalsInstr);
end; end;

View File

@ -276,7 +276,7 @@ type
function ProcessInputFromDbg(const AData: String): Boolean; override; function ProcessInputFromDbg(const AData: String): Boolean; override;
procedure SendCommandDataToDbg(); override; procedure SendCommandDataToDbg(); override;
public public
constructor Create; constructor Create(AThread, AFrame: Integer);
destructor Destroy; override; destructor Destroy; override;
property Res: TStringList read FRes; property Res: TStringList read FRes;
end; end;
@ -1025,9 +1025,9 @@ begin
Queue.SendDataToDBG(Self, 'version'); // end marker // do not sent before new prompt Queue.SendDataToDBG(Self, 'version'); // end marker // do not sent before new prompt
end; end;
constructor TLldbInstructionLocals.Create; constructor TLldbInstructionLocals.Create(AThread, AFrame: Integer);
begin begin
inherited Create('frame variable -P 1 -D 5'); // TODO: make -D 5 configurable inherited Create('frame variable -P 1 -D 5', AThread, AFrame); // TODO: make -D 5 configurable
FRes := TStringList.Create; FRes := TStringList.Create;
end; end;