mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-27 02:33:38 +02: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);
|
||||
end;
|
||||
skRecord: begin
|
||||
if (ResultInfo.TypeName = 'ShortString') or
|
||||
(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;
|
||||
AResult := 'record ' + ResultInfo.TypeName + ' '+ AResult;
|
||||
end;
|
||||
|
||||
skSimple: begin
|
||||
if ResultInfo.TypeName = 'CURRENCY' then
|
||||
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
|
||||
AResult := AResult;
|
||||
end;
|
||||
|
@ -263,7 +263,12 @@ var
|
||||
begin
|
||||
if (FTypeName = 'Variant') or
|
||||
(FTypeName = 'VARIANT') then
|
||||
FKind := skVariant
|
||||
FKind := skVariant
|
||||
else
|
||||
if (FTypeName = 'ShortString') or
|
||||
(FTypeName = 'SHORTSTRING') or
|
||||
(FTypeName = '&ShortString') then
|
||||
FKind := skSimple
|
||||
else
|
||||
FKind := skRecord;
|
||||
|
||||
|
@ -150,16 +150,7 @@ begin
|
||||
if not Assigned(FDBGInfo.Fields) then exit;
|
||||
EditInspected.Text:=FExpression+' : '+FDBGInfo.TypeName;
|
||||
GridDataSetup;
|
||||
// handle special records
|
||||
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;
|
||||
ShowDataFields;
|
||||
FGridData.AutoSizeColumn(2);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user