mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-05 23:32:33 +02:00
FpDebug: Show "self" in locals window. Fpc encodes it as "this", so FpDebug must replace the name. Issue #39907 and part of issue #40000
This commit is contained in:
parent
f7686f03f1
commit
60d221f23a
@ -279,6 +279,12 @@ type
|
||||
end;
|
||||
{%EndRegion }
|
||||
|
||||
{ TFpSymbolDwarfFreePascalDataParameter }
|
||||
|
||||
TFpSymbolDwarfFreePascalDataParameter = class(TFpSymbolDwarfDataParameter)
|
||||
procedure NameNeeded; override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
@ -406,6 +412,7 @@ begin
|
||||
DW_TAG_class_type: Result := TFpSymbolDwarfFreePascalTypeStructure;
|
||||
DW_TAG_array_type: Result := TFpSymbolDwarfFreePascalSymbolTypeArray;
|
||||
DW_TAG_subprogram: Result := TFpSymbolDwarfFreePascalDataProc;
|
||||
DW_TAG_formal_parameter: Result := TFpSymbolDwarfFreePascalDataParameter;
|
||||
else Result := inherited GetDwarfSymbolClass(ATag);
|
||||
end;
|
||||
end;
|
||||
@ -1911,6 +1918,15 @@ begin
|
||||
{$EndIf}
|
||||
end;
|
||||
|
||||
{ TFpSymbolDwarfFreePascalDataParameter }
|
||||
|
||||
procedure TFpSymbolDwarfFreePascalDataParameter.NameNeeded;
|
||||
begin
|
||||
inherited NameNeeded;
|
||||
if InformationEntry.IsArtificial and (Name = 'this') then
|
||||
SetName('self');
|
||||
end;
|
||||
|
||||
initialization
|
||||
DwarfSymbolClassMapList.AddMap(TFpDwarfFreePascalSymbolClassMapDwarf2);
|
||||
DwarfSymbolClassMapList.AddMap(TFpDwarfFreePascalSymbolClassMapDwarf3);
|
||||
|
Loading…
Reference in New Issue
Block a user