mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-06 14:18:14 +02:00
FpDebug: Set ProcValue (for FrameBaseNeeded) when locals/params are gotten from ProcVal.Members (affects stack and locals)
This commit is contained in:
parent
10e211092a
commit
ead31d2c8c
@ -1069,6 +1069,7 @@ DECL = DW_AT_decl_column, DW_AT_decl_file, DW_AT_decl_line
|
|||||||
FStateMachine: TDwarfLineInfoStateMachine;
|
FStateMachine: TDwarfLineInfoStateMachine;
|
||||||
FFrameBaseParser: TDwarfLocationExpression;
|
FFrameBaseParser: TDwarfLocationExpression;
|
||||||
FDwarf: TFpDwarfInfo;
|
FDwarf: TFpDwarfInfo;
|
||||||
|
FProcTypeInfo: TFpSymbolDwarfType;
|
||||||
function GetLineUnfixed: TDBGPtr;
|
function GetLineUnfixed: TDBGPtr;
|
||||||
function StateMachineValid: Boolean;
|
function StateMachineValid: Boolean;
|
||||||
function ReadVirtuality(out AFlags: TDbgSymbolFlags): Boolean;
|
function ReadVirtuality(out AFlags: TDbgSymbolFlags): Boolean;
|
||||||
@ -1113,6 +1114,7 @@ DECL = DW_AT_decl_column, DW_AT_decl_file, DW_AT_decl_line
|
|||||||
FAddressInfo: PDwarfAddressInfo;
|
FAddressInfo: PDwarfAddressInfo;
|
||||||
FLastMember: TFpSymbol;
|
FLastMember: TFpSymbol;
|
||||||
FProcMembers: TRefCntObjList; // Locals
|
FProcMembers: TRefCntObjList; // Locals
|
||||||
|
FProcValue: TFpSymbolDwarfDataProc; // not refcounted
|
||||||
|
|
||||||
procedure CreateMembers;
|
procedure CreateMembers;
|
||||||
protected
|
protected
|
||||||
@ -6629,6 +6631,8 @@ end;
|
|||||||
|
|
||||||
destructor TFpSymbolDwarfDataProc.Destroy;
|
destructor TFpSymbolDwarfDataProc.Destroy;
|
||||||
begin
|
begin
|
||||||
|
if FProcTypeInfo <> nil then
|
||||||
|
TFpSymbolDwarfTypeProc(FProcTypeInfo).FProcValue := nil;
|
||||||
FreeAndNil(FStateMachine);
|
FreeAndNil(FStateMachine);
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
@ -6922,9 +6926,14 @@ procedure TFpSymbolDwarfDataProc.TypeInfoNeeded;
|
|||||||
var
|
var
|
||||||
t: TFpSymbolDwarfTypeProc;
|
t: TFpSymbolDwarfTypeProc;
|
||||||
begin
|
begin
|
||||||
|
if FProcTypeInfo <> nil then
|
||||||
|
TFpSymbolDwarfTypeProc(FProcTypeInfo).FProcValue := nil;
|
||||||
|
|
||||||
t := TFpSymbolDwarfTypeProc.Create('', InformationEntry, FAddressInfo);
|
t := TFpSymbolDwarfTypeProc.Create('', InformationEntry, FAddressInfo);
|
||||||
SetTypeInfo(t); // TODO: avoid adding a reference, already got one....
|
SetTypeInfo(t); // TODO: avoid adding a reference, already got one....
|
||||||
t.ReleaseReference;
|
t.ReleaseReference;
|
||||||
|
FProcTypeInfo := t;
|
||||||
|
TFpSymbolDwarfTypeProc(FProcTypeInfo).FProcValue := Self;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TFpSymbolDwarfDataProc.GetParent: TFpSymbol;
|
function TFpSymbolDwarfDataProc.GetParent: TFpSymbol;
|
||||||
@ -7063,6 +7072,8 @@ begin
|
|||||||
FLastMember := TFpSymbolDwarf.CreateSubClass('', TDwarfInformationEntry(FProcMembers[AIndex]));
|
FLastMember := TFpSymbolDwarf.CreateSubClass('', TDwarfInformationEntry(FProcMembers[AIndex]));
|
||||||
{$IFDEF WITH_REFCOUNT_DEBUG}FLastMember.DbgRenameReference(@FLastMember, 'TFpSymbolDwarfDataProc.FLastMember');{$ENDIF}
|
{$IFDEF WITH_REFCOUNT_DEBUG}FLastMember.DbgRenameReference(@FLastMember, 'TFpSymbolDwarfDataProc.FLastMember');{$ENDIF}
|
||||||
Result := FLastMember;
|
Result := FLastMember;
|
||||||
|
if Result <> nil then
|
||||||
|
TFpSymbolDwarf(Result).LocalProcInfo := FProcValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TFpSymbolDwarfTypeProc.GetNestedSymbolExByName(const AIndex: String;
|
function TFpSymbolDwarfTypeProc.GetNestedSymbolExByName(const AIndex: String;
|
||||||
@ -7085,6 +7096,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
Result := FLastMember;
|
Result := FLastMember;
|
||||||
|
if Result <> nil then
|
||||||
|
TFpSymbolDwarf(Result).LocalProcInfo := FProcValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TFpSymbolDwarfTypeProc.GetNestedSymbolCount: Integer;
|
function TFpSymbolDwarfTypeProc.GetNestedSymbolCount: Integer;
|
||||||
|
Loading…
Reference in New Issue
Block a user