mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 20:59:12 +02:00
FpDebug: PascalBuilder, add missing output for some type declarations
git-svn-id: trunk@63772 -
This commit is contained in:
parent
4145a55fee
commit
5b077144a9
@ -372,6 +372,23 @@ var
|
|||||||
ADeclaration := Format('record%s%s%send', [LineEnding, s, GetIndent]);
|
ADeclaration := Format('record%s%s%send', [LineEnding, s, GetIndent]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function GetObjectType(out ADeclaration: String): Boolean;
|
||||||
|
var
|
||||||
|
s: String;
|
||||||
|
begin
|
||||||
|
if tdfSkipRecordBody in AFlags then begin
|
||||||
|
Result := True;
|
||||||
|
if GetTypeName(s, ADbgSymbol) then
|
||||||
|
ADeclaration := s + ' {=object}'
|
||||||
|
else
|
||||||
|
ADeclaration := Format('object {...};%s%send', [LineEnding, GetIndent]);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
Result := MembersAsGdbText(s, False);
|
||||||
|
if Result then
|
||||||
|
ADeclaration := Format('object%s%s%send', [LineEnding, s, GetIndent]);
|
||||||
|
end;
|
||||||
|
|
||||||
function GetEnumType(out ADeclaration: String): Boolean;
|
function GetEnumType(out ADeclaration: String): Boolean;
|
||||||
var
|
var
|
||||||
i, j, val: Integer;
|
i, j, val: Integer;
|
||||||
@ -498,9 +515,13 @@ begin
|
|||||||
skProcedure, skProcedureRef: Result := GetProcedureType(ATypeDeclaration);
|
skProcedure, skProcedureRef: Result := GetProcedureType(ATypeDeclaration);
|
||||||
skClass: Result := GetClassType(ATypeDeclaration);
|
skClass: Result := GetClassType(ATypeDeclaration);
|
||||||
skRecord: Result := GetRecordType(ATypeDeclaration);
|
skRecord: Result := GetRecordType(ATypeDeclaration);
|
||||||
|
skObject: Result := GetObjectType(ATypeDeclaration);
|
||||||
|
//skInterface: Result := GetInterfaceType(ATypeDeclaration);
|
||||||
skEnum: Result := GetEnumType(ATypeDeclaration);
|
skEnum: Result := GetEnumType(ATypeDeclaration);
|
||||||
skset: Result := GetSetType(ATypeDeclaration);
|
skset: Result := GetSetType(ATypeDeclaration);
|
||||||
skArray: Result := GetArrayType(ATypeDeclaration);
|
skArray: Result := GetArrayType(ATypeDeclaration);
|
||||||
|
skNone: ATypeDeclaration := '<unknown>';
|
||||||
|
else Result := GetBaseType(ATypeDeclaration);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if VarName <> '' then
|
if VarName <> '' then
|
||||||
@ -778,6 +799,7 @@ function TFpPascalPrettyPrinter.InternalPrintValue(out APrintedValue: String;
|
|||||||
|
|
||||||
procedure DoType;
|
procedure DoType;
|
||||||
begin
|
begin
|
||||||
|
// maybe include tdfIncludeVarName for structure members "TFooClass.SomeField"
|
||||||
if GetTypeAsDeclaration(APrintedValue, AValue.DbgSymbol) then
|
if GetTypeAsDeclaration(APrintedValue, AValue.DbgSymbol) then
|
||||||
APrintedValue := 'type ' + APrintedValue
|
APrintedValue := 'type ' + APrintedValue
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user