mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-11 05:49:38 +01:00
debugger: treat ShortString type as skSimple type, reduce amount of hacks for ShortString handling
git-svn-id: trunk@23005 -
This commit is contained in:
parent
12a6edefa1
commit
fdb1f1236c
@ -2372,22 +2372,15 @@ begin
|
|||||||
AResult := GetVariantValue(AResult);
|
AResult := GetVariantValue(AResult);
|
||||||
end;
|
end;
|
||||||
skRecord: begin
|
skRecord: begin
|
||||||
if (ResultInfo.TypeName = 'ShortString') or
|
AResult := 'record ' + ResultInfo.TypeName + ' '+ AResult;
|
||||||
(ResultInfo.TypeName = 'SHORTSTRING') then
|
|
||||||
AResult := AResult // don't show 'record ShortString' as this is debug info implementation details
|
|
||||||
else
|
|
||||||
if (ResultInfo.TypeName = '&ShortString') then
|
|
||||||
begin
|
|
||||||
// we have an address here, so we need to typecast
|
|
||||||
AResult := GetStrValue('ShortString(%s)', [S]);
|
|
||||||
end
|
|
||||||
else
|
|
||||||
AResult := 'record ' + ResultInfo.TypeName + ' '+ AResult;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
skSimple: begin
|
skSimple: begin
|
||||||
if ResultInfo.TypeName = 'CURRENCY' then
|
if ResultInfo.TypeName = 'CURRENCY' then
|
||||||
AResult := FormatCurrency(AResult)
|
AResult := FormatCurrency(AResult)
|
||||||
|
else
|
||||||
|
if (ResultInfo.TypeName = '&ShortString') then
|
||||||
|
AResult := GetStrValue('ShortString(%s)', [S]) // we have an address here, so we need to typecast
|
||||||
else
|
else
|
||||||
AResult := AResult;
|
AResult := AResult;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -263,7 +263,12 @@ var
|
|||||||
begin
|
begin
|
||||||
if (FTypeName = 'Variant') or
|
if (FTypeName = 'Variant') or
|
||||||
(FTypeName = 'VARIANT') then
|
(FTypeName = 'VARIANT') then
|
||||||
FKind := skVariant
|
FKind := skVariant
|
||||||
|
else
|
||||||
|
if (FTypeName = 'ShortString') or
|
||||||
|
(FTypeName = 'SHORTSTRING') or
|
||||||
|
(FTypeName = '&ShortString') then
|
||||||
|
FKind := skSimple
|
||||||
else
|
else
|
||||||
FKind := skRecord;
|
FKind := skRecord;
|
||||||
|
|
||||||
|
|||||||
@ -150,16 +150,7 @@ begin
|
|||||||
if not Assigned(FDBGInfo.Fields) then exit;
|
if not Assigned(FDBGInfo.Fields) then exit;
|
||||||
EditInspected.Text:=FExpression+' : '+FDBGInfo.TypeName;
|
EditInspected.Text:=FExpression+' : '+FDBGInfo.TypeName;
|
||||||
GridDataSetup;
|
GridDataSetup;
|
||||||
// handle special records
|
ShowDataFields;
|
||||||
if (FDBGInfo.TypeName = 'ShortString') or
|
|
||||||
(FDBGInfo.TypeName = 'SHORTSTRING') then
|
|
||||||
begin
|
|
||||||
FGridData.Cells[0,1]:=FExpression;
|
|
||||||
FGridData.Cells[1,1]:=FDBGInfo.TypeName;
|
|
||||||
FGridData.Cells[2,1]:=FHumanReadable;
|
|
||||||
end
|
|
||||||
else
|
|
||||||
ShowDataFields;
|
|
||||||
FGridData.AutoSizeColumn(2);
|
FGridData.AutoSizeColumn(2);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user