mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 18:19:34 +02:00
FpDebug: defer reading register-list for non-threads (only showing in thread window)
This commit is contained in:
parent
c29c71d9bc
commit
5109ab17f3
@ -92,10 +92,12 @@ type
|
|||||||
FIsSymbolResolved: boolean;
|
FIsSymbolResolved: boolean;
|
||||||
FSymbol: TFpSymbol;
|
FSymbol: TFpSymbol;
|
||||||
FRegisterValueList: TDbgRegisterValueList;
|
FRegisterValueList: TDbgRegisterValueList;
|
||||||
|
FRegisterValueListDone: Boolean;
|
||||||
FIndex: integer;
|
FIndex: integer;
|
||||||
function GetFunctionName: string;
|
function GetFunctionName: string;
|
||||||
function GetProcSymbol: TFpSymbol;
|
function GetProcSymbol: TFpSymbol;
|
||||||
function GetLine: integer;
|
function GetLine: integer;
|
||||||
|
function GetRegisterValueList: TDbgRegisterValueList;
|
||||||
function GetSourceFile: string;
|
function GetSourceFile: string;
|
||||||
function GetSrcClassName: string;
|
function GetSrcClassName: string;
|
||||||
public
|
public
|
||||||
@ -107,7 +109,7 @@ type
|
|||||||
property FunctionName: string read GetFunctionName;
|
property FunctionName: string read GetFunctionName;
|
||||||
property SrcClassName: string read GetSrcClassName;
|
property SrcClassName: string read GetSrcClassName;
|
||||||
property Line: integer read GetLine;
|
property Line: integer read GetLine;
|
||||||
property RegisterValueList: TDbgRegisterValueList read FRegisterValueList;
|
property RegisterValueList: TDbgRegisterValueList read GetRegisterValueList;
|
||||||
property ProcSymbol: TFpSymbol read GetProcSymbol;
|
property ProcSymbol: TFpSymbol read GetProcSymbol;
|
||||||
property Index: integer read FIndex;
|
property Index: integer read FIndex;
|
||||||
end;
|
end;
|
||||||
@ -1849,6 +1851,22 @@ begin
|
|||||||
result := -1;
|
result := -1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TDbgCallstackEntry.GetRegisterValueList: TDbgRegisterValueList;
|
||||||
|
var
|
||||||
|
i: Integer;
|
||||||
|
L: TDbgRegisterValueList;
|
||||||
|
R: TDbgRegisterValue;
|
||||||
|
begin
|
||||||
|
if (not FRegisterValueListDone) and (FRegisterValueList.Count = 0) then begin
|
||||||
|
L := FThread.RegisterValueList;
|
||||||
|
for i := 0 to L.Count - 1 do begin
|
||||||
|
R := L[i];
|
||||||
|
FRegisterValueList.DbgRegisterAutoCreate[R.Name].SetValue(R.NumValue, R.StrValue, R.Size, R.DwarfIdx);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Result := FRegisterValueList;
|
||||||
|
end;
|
||||||
|
|
||||||
function TDbgCallstackEntry.GetSourceFile: string;
|
function TDbgCallstackEntry.GetSourceFile: string;
|
||||||
var
|
var
|
||||||
Symbol: TFpSymbol;
|
Symbol: TFpSymbol;
|
||||||
@ -3544,13 +3562,6 @@ begin
|
|||||||
StackPointer := Thread.GetStackPointerRegisterValue;
|
StackPointer := Thread.GetStackPointerRegisterValue;
|
||||||
FrameBasePointer := Thread.GetStackBasePointerRegisterValue;
|
FrameBasePointer := Thread.GetStackBasePointerRegisterValue;
|
||||||
ANewFrame := TDbgCallstackEntry.create(Thread, 0, FrameBasePointer, CodePointer);
|
ANewFrame := TDbgCallstackEntry.create(Thread, 0, FrameBasePointer, CodePointer);
|
||||||
|
|
||||||
i := Thread.RegisterValueList.Count;
|
|
||||||
while i > 0 do begin
|
|
||||||
dec(i);
|
|
||||||
R := Thread.RegisterValueList[i];
|
|
||||||
ANewFrame.RegisterValueList.DbgRegisterAutoCreate[R.Name].SetValue(R.NumValue, R.StrValue, R.Size, R.DwarfIdx);
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TDbgThread }
|
{ TDbgThread }
|
||||||
|
Loading…
Reference in New Issue
Block a user