mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 07:59:44 +02:00
FpDebug: array / tests
git-svn-id: trunk@44554 -
This commit is contained in:
parent
cedbc0d203
commit
759c840e8a
@ -1925,6 +1925,7 @@ end;
|
||||
|
||||
function TFpDbgDwarfValueArray.GetAsCardinal: QWord;
|
||||
begin
|
||||
// TODO cache
|
||||
if not MemManager.ReadUnsignedInt(OrdOrAddress, AddressSize, Result) then begin
|
||||
FLastError := MemManager.LastError;
|
||||
Result := 0;
|
||||
@ -1991,7 +1992,7 @@ begin
|
||||
if (sfDynArray in t.Flags) and (AsCardinal <> 0) and
|
||||
GetDwarfDataAddress(Addr, TDbgDwarfTypeIdentifier(FOwner))
|
||||
then begin
|
||||
if not IsReadableMem(Addr) then
|
||||
if not (IsReadableMem(Addr) and (LocToAddr(Addr) > 4)) then
|
||||
exit;
|
||||
Addr.Address := Addr.Address - 4;
|
||||
if MemManager.ReadSignedInt(Addr, 4, i) then begin
|
||||
@ -2036,19 +2037,30 @@ begin
|
||||
If not Result then
|
||||
exit;
|
||||
|
||||
// TODO ordinal
|
||||
|
||||
assert(FTypeCastTargetType.Kind = skArray, 'TFpDbgDwarfValueArray.IsValidTypeCast: FTypeCastTargetType.Kind = skArray');
|
||||
//TODO: shortcut, if FTypeCastTargetType = FTypeCastSourceValue.TypeInfo ?
|
||||
if (FTypeCastSourceValue.FieldFlags * [svfAddress, svfSize, svfSizeOfPointer] = [svfAddress]) then
|
||||
exit
|
||||
else
|
||||
if (FTypeCastSourceValue.FieldFlags * [svfAddress, svfSize] = [svfAddress, svfSize]) and
|
||||
(FTypeCastSourceValue.Size = FOwner.FCU.FAddressSize)
|
||||
then
|
||||
exit
|
||||
else
|
||||
if (FTypeCastSourceValue.FieldFlags * [svfAddress, svfSizeOfPointer] = [svfAddress, svfSizeOfPointer])
|
||||
then
|
||||
exit;
|
||||
|
||||
if sfDynArray in FTypeCastTargetType.Flags then begin
|
||||
// dyn array
|
||||
// TODO ordinal
|
||||
if (FTypeCastSourceValue.FieldFlags * [svfAddress, svfSize] = [svfAddress, svfSize]) and
|
||||
(FTypeCastSourceValue.Size = FOwner.FCU.FAddressSize)
|
||||
then
|
||||
exit
|
||||
else
|
||||
if (FTypeCastSourceValue.FieldFlags * [svfAddress, svfSizeOfPointer] = [svfAddress, svfSizeOfPointer])
|
||||
then
|
||||
exit;
|
||||
end
|
||||
else begin
|
||||
// stat array
|
||||
if (FTypeCastSourceValue.FieldFlags * [svfAddress, svfSize] = [svfAddress, svfSize]) and
|
||||
(FTypeCastSourceValue.Size = FTypeCastTargetType.Size)
|
||||
then
|
||||
exit;
|
||||
end;
|
||||
Result := False;
|
||||
end;
|
||||
|
||||
|
@ -174,10 +174,17 @@ type
|
||||
property AsWideString: WideString read GetAsWideString;
|
||||
property AsFloat: Extended read GetAsFloat;
|
||||
|
||||
property Address: TFpDbgMemLocation read GetAddress; // Address of variable
|
||||
property Size: Integer read GetSize; // Size of variable
|
||||
property DataAddress: TFpDbgMemLocation read GetDataAddress; // Address of Data, if avail (e.g. String, TObject, ..., BUT NOT record)
|
||||
property DataSize: Integer read GetDataSize; // Sive of Data, if avail (e.g. String, TObject, ..., BUT NOT record)
|
||||
(* * Address/Size
|
||||
Address of the variable (as returned by the "@" address of operator
|
||||
* DataAddress/DataSize
|
||||
Address of Data, if avail and diff from Address (e.g. String, TObject, DynArray, ..., BUT NOT record)
|
||||
Otherwise same as Address/Size
|
||||
For pointers, this is the address of the pointed-to data
|
||||
*)
|
||||
property Address: TFpDbgMemLocation read GetAddress;
|
||||
property Size: Integer read GetSize;
|
||||
property DataAddress: TFpDbgMemLocation read GetDataAddress; //
|
||||
property DataSize: Integer read GetDataSize;
|
||||
|
||||
property HasBounds: Boolean read GetHasBounds;
|
||||
property OrdLowBound: Int64 read GetOrdLowBound; // need typecast for QuadWord
|
||||
@ -658,12 +665,12 @@ end;
|
||||
|
||||
function TFpDbgValue.GetDataAddress: TFpDbgMemLocation;
|
||||
begin
|
||||
Result := InvalidLoc;
|
||||
Result := Address;
|
||||
end;
|
||||
|
||||
function TFpDbgValue.GetDataSize: Integer;
|
||||
begin
|
||||
Result := 0;
|
||||
Result := Size;
|
||||
end;
|
||||
|
||||
function TFpDbgValue.GetSize: Integer;
|
||||
|
@ -2139,7 +2139,7 @@ begin
|
||||
end
|
||||
else
|
||||
if tmp.Kind = skPointer then begin
|
||||
if (svfDataAddress in tmp.FieldFlags) and (IsReadableLoc(tmp.DataAddress)) and
|
||||
if (svfDataAddress in tmp.FieldFlags) and (IsReadableLoc(tmp.DataAddress)) and // TODO, what if Not readable addr
|
||||
(tmp.TypeInfo <> nil) //and (tmp.TypeInfo.TypeInfo <> nil)
|
||||
then begin
|
||||
//TODO: maybe introduce a method TypeCastFromAddress, so we can skip the twp2 object
|
||||
|
@ -323,6 +323,36 @@ var
|
||||
ArrayGlob_PStatDynClass1: PArrayStatDynClass;
|
||||
ArrayGlob_PStatDynRec1: PArrayStatDynRec;
|
||||
|
||||
// copy of Pointers, to be used as Var Param
|
||||
ArrayGlob_P2DynAInt1: PArrayDynInt;
|
||||
ArrayGlob_P2StatAInt1: PArrayStatIntParam1;
|
||||
ArrayGlob_P2StatAInt2: PArrayStatIntParam2;
|
||||
|
||||
ArrayGlob_P2DynInt1, ArrayGlob_P2DynInt2: PArrayDynInt;
|
||||
ArrayGlob_P2DynClass1: PArrayDynClass;
|
||||
ArrayGlob_P2DynRec1: PArrayDynRec;
|
||||
ArrayGlob_P2DynRec2: PArrayDynRec2;
|
||||
|
||||
ArrayGlob_P2DynDynInt1: PArrayDynDynInt;
|
||||
ArrayGlob_P2DynDynClass1: PArrayDynDynClass;
|
||||
ArrayGlob_P2DynDynRec1: PArrayDynDynRec;
|
||||
|
||||
ArrayGlob_P2DynStatInt1: PArrayDynStatInt;
|
||||
ArrayGlob_P2DynStatClass1: PArrayDynStatClass;
|
||||
ArrayGlob_P2DynStatRec1: PArrayDynStatRec;
|
||||
|
||||
ArrayGlob_P2StatInt1: PArrayStatInt;
|
||||
ArrayGlob_P2StatClass1: PArrayStatClass;
|
||||
ArrayGlob_P2StatRec1: PArrayStatRec;
|
||||
|
||||
ArrayGlob_P2StatStatInt1: PArrayStatStatInt;
|
||||
ArrayGlob_P2StatStatClass1: PArrayStatStatClass;
|
||||
ArrayGlob_P2StatStatRec1: PArrayStatStatRec;
|
||||
|
||||
ArrayGlob_P2StatDynInt1: PArrayStatDynInt;
|
||||
ArrayGlob_P2StatDynClass1: PArrayStatDynClass;
|
||||
ArrayGlob_P2StatDynRec1: PArrayStatDynRec;
|
||||
|
||||
procedure Test1;
|
||||
|
||||
implementation
|
||||
@ -963,6 +993,38 @@ begin
|
||||
|
||||
{%endregion ArrayGlob }
|
||||
|
||||
// copy for var param
|
||||
ArrayGlob_P2DynAInt1 := ArrayGlob_PDynAInt1;
|
||||
ArrayGlob_P2StatAInt1 := ArrayGlob_PStatAInt1;
|
||||
ArrayGlob_P2StatAInt2 := ArrayGlob_PStatAInt2;
|
||||
|
||||
ArrayGlob_P2DynInt1 := ArrayGlob_PDynInt1;
|
||||
ArrayGlob_P2DynInt2 := ArrayGlob_PDynInt2;
|
||||
ArrayGlob_P2DynClass1 := ArrayGlob_PDynClass1;
|
||||
ArrayGlob_P2DynRec1 := ArrayGlob_PDynRec1;
|
||||
ArrayGlob_P2DynRec2 := ArrayGlob_PDynRec2;
|
||||
|
||||
ArrayGlob_P2DynDynInt1 := ArrayGlob_PDynDynInt1;
|
||||
ArrayGlob_P2DynDynClass1 := ArrayGlob_PDynDynClass1;
|
||||
ArrayGlob_P2DynDynRec1 := ArrayGlob_PDynDynRec1;
|
||||
|
||||
ArrayGlob_P2DynStatInt1 := ArrayGlob_PDynStatInt1;
|
||||
ArrayGlob_P2DynStatClass1 := ArrayGlob_PDynStatClass1;
|
||||
ArrayGlob_P2DynStatRec1 := ArrayGlob_PDynStatRec1;
|
||||
|
||||
ArrayGlob_P2StatInt1 := ArrayGlob_PStatInt1;
|
||||
ArrayGlob_P2StatClass1 := ArrayGlob_PStatClass1;
|
||||
ArrayGlob_P2StatRec1 := ArrayGlob_PStatRec1;
|
||||
|
||||
ArrayGlob_P2StatStatInt1 := ArrayGlob_PStatStatInt1;
|
||||
ArrayGlob_P2StatStatClass1 := ArrayGlob_PStatStatClass1;
|
||||
ArrayGlob_P2StatStatRec1 := ArrayGlob_PStatStatRec1;
|
||||
|
||||
ArrayGlob_P2StatDynInt1 := ArrayGlob_PStatDynInt1;
|
||||
ArrayGlob_P2StatDynClass1 := ArrayGlob_PStatDynClass1;
|
||||
ArrayGlob_P2StatDynRec1 := ArrayGlob_PStatDynRec1;
|
||||
|
||||
|
||||
ArrayClass1 := TArrayClass1.Create;
|
||||
ArrayClass1.Test1Method(
|
||||
ArrayGlob_DynAInt1,
|
||||
@ -1056,35 +1118,35 @@ begin
|
||||
ArrayGlob_StatDynRec1,
|
||||
|
||||
// Pointer
|
||||
ArrayGlob_PDynAInt1,
|
||||
ArrayGlob_PStatAInt1,
|
||||
ArrayGlob_PStatAInt2,
|
||||
ArrayGlob_P2DynAInt1,
|
||||
ArrayGlob_P2StatAInt1,
|
||||
ArrayGlob_P2StatAInt2,
|
||||
|
||||
ArrayGlob_PDynInt1,
|
||||
ArrayGlob_PDynInt2,
|
||||
ArrayGlob_PDynClass1,
|
||||
ArrayGlob_PDynRec1,
|
||||
ArrayGlob_PDynRec2,
|
||||
ArrayGlob_P2DynInt1,
|
||||
ArrayGlob_P2DynInt2,
|
||||
ArrayGlob_P2DynClass1,
|
||||
ArrayGlob_P2DynRec1,
|
||||
ArrayGlob_P2DynRec2,
|
||||
|
||||
ArrayGlob_PDynDynInt1,
|
||||
ArrayGlob_PDynDynClass1,
|
||||
ArrayGlob_PDynDynRec1,
|
||||
ArrayGlob_P2DynDynInt1,
|
||||
ArrayGlob_P2DynDynClass1,
|
||||
ArrayGlob_P2DynDynRec1,
|
||||
|
||||
ArrayGlob_PDynStatInt1,
|
||||
ArrayGlob_PDynStatClass1,
|
||||
ArrayGlob_PDynStatRec1,
|
||||
ArrayGlob_P2DynStatInt1,
|
||||
ArrayGlob_P2DynStatClass1,
|
||||
ArrayGlob_P2DynStatRec1,
|
||||
|
||||
ArrayGlob_PStatInt1,
|
||||
ArrayGlob_PStatClass1,
|
||||
ArrayGlob_PStatRec1,
|
||||
ArrayGlob_P2StatInt1,
|
||||
ArrayGlob_P2StatClass1,
|
||||
ArrayGlob_P2StatRec1,
|
||||
|
||||
ArrayGlob_PStatStatInt1,
|
||||
ArrayGlob_PStatStatClass1,
|
||||
ArrayGlob_PStatStatRec1,
|
||||
ArrayGlob_P2StatStatInt1,
|
||||
ArrayGlob_P2StatStatClass1,
|
||||
ArrayGlob_P2StatStatRec1,
|
||||
|
||||
ArrayGlob_PStatDynInt1,
|
||||
ArrayGlob_PStatDynClass1,
|
||||
ArrayGlob_PStatDynRec1
|
||||
ArrayGlob_P2StatDynInt1,
|
||||
ArrayGlob_P2StatDynClass1,
|
||||
ArrayGlob_P2StatDynRec1
|
||||
|
||||
);
|
||||
end;
|
||||
|
@ -14,7 +14,7 @@ const
|
||||
BREAK_LINE_TestWatchesUnitSimple_2 = 189;
|
||||
BREAK_LINE_TestWatchesUnitSimple_3 = 196;
|
||||
|
||||
BREAK_LINE_TestWatchesUnitArray = 808;
|
||||
BREAK_LINE_TestWatchesUnitArray = 838;
|
||||
|
||||
type
|
||||
|
||||
@ -459,7 +459,7 @@ end;
|
||||
|
||||
procedure TTestWatches.AddExpectArray_1;
|
||||
var
|
||||
i: Integer;
|
||||
i, i2: Integer;
|
||||
s,s2: String;
|
||||
r: PWatchExpectation;
|
||||
begin
|
||||
@ -472,131 +472,135 @@ begin
|
||||
{%region Fields / Glob / ... }
|
||||
for i := 0 to 4 do begin
|
||||
case i of
|
||||
0,5: s := 'Field_';
|
||||
1,6: s := 'ArrayGlob_';
|
||||
2,7: s := 'Arg_';
|
||||
3,8: s := 'VArg_';
|
||||
4,9: s := 'Local_';
|
||||
0: s := 'Field_';
|
||||
1: s := 'ArrayGlob_';
|
||||
2: s := 'Arg_';
|
||||
3: s := 'VArg_';
|
||||
4: s := 'Local_';
|
||||
end;
|
||||
s2 := '';
|
||||
if i >= 5 then s2 := '^';
|
||||
|
||||
if i <> 2 then begin // open array / TODO
|
||||
AddFmtDef(Format('%sDynAInt1%1:s', [s,s2]), '^[\(L].*?100, 101, 102', skArray, '', [fTpMtch]);
|
||||
AddSimpleInt(Format('%sDynAInt1%1:s[0]', [s,s2]), 100, M_Int);
|
||||
AddSimpleInt(Format('%sDynAInt1%1:s[1]', [s,s2]), 101, M_Int);
|
||||
AddFmtDef(Format('%sDynAInt1%1:s[0][0]', [s,s2]), 'Error', skNone, '', [fTpMtch, IgnKind, fTExpectError]); // ERROR
|
||||
r := AddFmtDef(Format('@%sDynInt1', [s]), 'replaceme', skPointer, '', [fTpMtch]);
|
||||
if i = 3 then UpdResMinFpc(r, stSymAll, 020600);
|
||||
r^.OnBeforeTest := @AdjustArrayExpectToAddress;
|
||||
r^.UserData := pointer(ptruint(Length(FCurrentExpect^)));
|
||||
AddFmtDef(Format('%sPDynInt1', [s]), '\$[0-9A-F]', skPointer, '', [fTpMtch]);
|
||||
|
||||
r := AddFmtDef(Format('@%sStatInt1', [s]), 'replaceme', skPointer, '', [fTpMtch]);
|
||||
if i = 3 then UpdResMinFpc(r, stSymAll, 020600);
|
||||
r^.OnBeforeTest := @AdjustArrayExpectToAddress;
|
||||
r^.UserData := pointer(ptruint(Length(FCurrentExpect^)));
|
||||
AddFmtDef(Format('%sPStatInt1', [s]), '\$[0-9A-F]', skPointer, '', [fTpMtch]);
|
||||
|
||||
|
||||
for i2 := 0 to 1 do begin
|
||||
s2 := '';
|
||||
if i2 = 1 then begin
|
||||
s := s + 'P';
|
||||
s2 := '^';
|
||||
end;
|
||||
|
||||
if not (i in [2,3]) then begin // open array / TODO
|
||||
AddFmtDef(Format('%sDynAInt1%1:s', [s,s2]), '^[\(L].*?100, 101, 102', skArray, '', [fTpMtch]);
|
||||
AddSimpleInt(Format('%sDynAInt1%1:s[0]', [s,s2]), 100, M_Int);
|
||||
AddSimpleInt(Format('%sDynAInt1%1:s[1]', [s,s2]), 101, M_Int);
|
||||
AddFmtDef(Format('%sDynAInt1%1:s[0][0]', [s,s2]), 'Error', skNone, '', [fTpMtch, IgnKind, fTExpectError]); // ERROR
|
||||
end;
|
||||
|
||||
|
||||
AddFmtDef(Format('%sStatAInt1%1:s', [s,s2]), '^[\(L].*?6600, 6601, 6602',
|
||||
skArray, '', [fTpMtch]);
|
||||
AddSimpleInt(Format('%sStatAInt1%1:s[4]', [s,s2]), 6600, M_Int);
|
||||
AddSimpleInt(Format('%sStatAInt1%1:s[9]', [s,s2]), 6699, M_Int);
|
||||
AddFmtDef(Format('%sStatAInt1%1:s[3]', [s,s2]), '', skSimple, M_Int, [fTpMtch]); // Just do not crash
|
||||
AddFmtDef(Format('%sStatAInt1%1:s[10]', [s,s2]), '', skSimple, M_Int, [fTpMtch]); // Just do not crash
|
||||
AddFmtDef(Format('%sStatAInt1%1:s[-1]', [s,s2]), '', skSimple, M_Int, [fTpMtch]); // Just do not crash
|
||||
AddFmtDef(Format('%sStatAInt1%1:s', [s,s2]), '^[\(L].*?6600, 6601, 6602',
|
||||
skArray, '', [fTpMtch]);
|
||||
AddSimpleInt(Format('%sStatAInt1%1:s[4]', [s,s2]), 6600, M_Int);
|
||||
AddSimpleInt(Format('%sStatAInt1%1:s[9]', [s,s2]), 6699, M_Int);
|
||||
AddFmtDef(Format('%sStatAInt1%1:s[3]', [s,s2]), '', skSimple, M_Int, [fTpMtch]); // Just do not crash
|
||||
AddFmtDef(Format('%sStatAInt1%1:s[10]', [s,s2]), '', skSimple, M_Int, [fTpMtch]); // Just do not crash
|
||||
AddFmtDef(Format('%sStatAInt1%1:s[-1]', [s,s2]), '', skSimple, M_Int, [fTpMtch]); // Just do not crash
|
||||
|
||||
|
||||
AddFmtDef(Format('%sStatAInt2%1:s', [s,s2]), '^[\(L].*?3300, 3301, 3302',
|
||||
skArray, '', [fTpMtch]);
|
||||
AddSimpleInt(Format('%sStatAInt2%1:s[-4]', [s,s2]), 3300, M_Int);
|
||||
AddSimpleInt(Format('%sStatAInt2%1:s[0]', [s,s2]), 3304, M_Int);
|
||||
AddFmtDef(Format('%sStatAInt2%1:s', [s,s2]), '^[\(L].*?3300, 3301, 3302',
|
||||
skArray, '', [fTpMtch]);
|
||||
AddSimpleInt(Format('%sStatAInt2%1:s[-4]', [s,s2]), 3300, M_Int);
|
||||
AddSimpleInt(Format('%sStatAInt2%1:s[0]', [s,s2]), 3304, M_Int);
|
||||
|
||||
|
||||
AddFmtDef(Format('%sDynInt2%1:s', [s,s2]), '^nil', skArray, '', [fTpMtch]);
|
||||
r := AddFmtDef(Format('TArrayDynInt(%sDynInt2%1:s)', [s,s2]), '^nil', skArray, '', [fTpMtch]);
|
||||
if i in [3] then UpdResMinFpc(r, stSymAll, 020600);
|
||||
r := AddSimpleInt(Format('QWord(%sDynInt2%1:s)', [s,s2]), 0, 'QWord');
|
||||
if i in [3] then UpdResMinFpc(r, stSymAll, 020600);
|
||||
AddFmtDef(Format('%sDynInt2%1:s', [s,s2]), '^nil', skArray, '', [fTpMtch]);
|
||||
r := AddFmtDef(Format('TArrayDynInt(%sDynInt2%1:s)', [s,s2]), '^nil', skArray, '', [fTpMtch]);
|
||||
if i in [3] then UpdResMinFpc(r, stSymAll, 020600);
|
||||
r := AddSimpleInt(Format('QWord(%sDynInt2%1:s)', [s,s2]), 0, 'QWord');
|
||||
if i in [3] then UpdResMinFpc(r, stSymAll, 020600);
|
||||
|
||||
|
||||
AddFmtDef(Format('%sDynInt1%1:s', [s,s2]), '^[\(L].*?5511, 5512, 5513, 5514, -5511',
|
||||
skArray, '', [fTpMtch]);
|
||||
AddSimpleInt(Format('%sDynInt1%1:s[0]', [s,s2]), 5511, M_Int);
|
||||
AddSimpleInt(Format('%sDynInt1%1:s[19]', [s,s2]), 5500, M_Int);
|
||||
r := AddFmtDef(Format('TArrayDynInt(%sDynInt1%1:s)', [s,s2]), '^[\(L].*?5511, 5512, 5513, 5514, -5511',
|
||||
skArray, '', [fTpMtch]);
|
||||
if i in [3] then UpdResMinFpc(r, stSymAll, 020600);
|
||||
r := AddSimpleInt(Format('TArrayDynInt(%sDynInt1%1:s)[0]', [s,s2]), 5511, M_Int);
|
||||
if i in [3] then UpdResMinFpc(r, stSymAll, 020600);
|
||||
AddFmtDef(Format('%sDynInt1%1:s', [s,s2]), '^[\(L].*?5511, 5512, 5513, 5514, -5511',
|
||||
skArray, '', [fTpMtch]);
|
||||
AddSimpleInt(Format('%sDynInt1%1:s[0]', [s,s2]), 5511, M_Int);
|
||||
AddSimpleInt(Format('%sDynInt1%1:s[19]', [s,s2]), 5500, M_Int);
|
||||
r := AddFmtDef(Format('TArrayDynInt(%sDynInt1%1:s)', [s,s2]), '^[\(L].*?5511, 5512, 5513, 5514, -5511',
|
||||
skArray, '', [fTpMtch]);
|
||||
if i in [3] then UpdResMinFpc(r, stSymAll, 020600);
|
||||
r := AddSimpleInt(Format('TArrayDynInt(%sDynInt1%1:s)[0]', [s,s2]), 5511, M_Int);
|
||||
if i in [3] then UpdResMinFpc(r, stSymAll, 020600);
|
||||
|
||||
|
||||
AddFmtDef(Format('%sDynClass1%1:s', [s,s2]), '^[\(L].*?'+
|
||||
'\(.*?Field_INT1 = 98700;.*?Field_INT2 = 98701;.*?Field_DYNAINT1 = \(9900, 9901\);.*?\), ' +
|
||||
'\(.*?Field_INT1 = 88700;.*?Field_INT2 = 88701;.*?Field_DYNAINT1 = \(8900, 8901\);.*?\), ' +
|
||||
'\(.*?Field_INT1 = 78700;.*?Field_INT2 = 78701;.*?Field_DYNAINT1 = \(7900, 7901, 7902\);.*?\)',
|
||||
skArray, '', [fTpMtch]);
|
||||
AddFmtDef(Format('%sDynClass1%1:s[0]', [s,s2]),
|
||||
'\(.*?Field_INT1 = 98700;.*?Field_INT2 = 98701;.*?Field_DYNAINT1 = \(9900, 9901\);.*?\), ',
|
||||
skClass, 'TArrayClass1', [fTpMtch]);
|
||||
AddFmtDef(Format('%sDynClass1%1:s[1]', [s,s2]),
|
||||
'\(.*?Field_INT1 = 88700;.*?Field_INT2 = 88701;.*?Field_DYNAINT1 = \(8900, 8901\);.*?\), ',
|
||||
skClass, 'TArrayClass1', [fTpMtch]);
|
||||
AddSimpleInt(Format('%sDynClass1%1:s[0].Field_INT1', [s,s2]), 98700, M_Int);
|
||||
AddFmtDef(Format('%sDynClass1%1:s', [s,s2]), '^[\(L].*?'+
|
||||
'\(.*?Field_INT1 = 98700;.*?Field_INT2 = 98701;.*?Field_DYNAINT1 = \(9900, 9901\);.*?\), ' +
|
||||
'\(.*?Field_INT1 = 88700;.*?Field_INT2 = 88701;.*?Field_DYNAINT1 = \(8900, 8901\);.*?\), ' +
|
||||
'\(.*?Field_INT1 = 78700;.*?Field_INT2 = 78701;.*?Field_DYNAINT1 = \(7900, 7901, 7902\);.*?\)',
|
||||
skArray, '', [fTpMtch]);
|
||||
AddFmtDef(Format('%sDynClass1%1:s[0]', [s,s2]),
|
||||
'\(.*?Field_INT1 = 98700;.*?Field_INT2 = 98701;.*?Field_DYNAINT1 = \(9900, 9901\);.*?\), ',
|
||||
skClass, 'TArrayClass1', [fTpMtch]);
|
||||
AddFmtDef(Format('%sDynClass1%1:s[1]', [s,s2]),
|
||||
'\(.*?Field_INT1 = 88700;.*?Field_INT2 = 88701;.*?Field_DYNAINT1 = \(8900, 8901\);.*?\), ',
|
||||
skClass, 'TArrayClass1', [fTpMtch]);
|
||||
AddSimpleInt(Format('%sDynClass1%1:s[0].Field_INT1', [s,s2]), 98700, M_Int);
|
||||
|
||||
|
||||
AddFmtDef(Format('%sDynRec1%1:s', [s,s2]), '^[\(L].*?'+
|
||||
'\(.*?FieldINT1 = 200;.*?FieldINT2 = 201;.*?\), ' +
|
||||
'\(.*?FieldINT1 = 210;.*?FieldINT2 = 211;.*?\), ' +
|
||||
'\(.*?FieldINT1 = 220;.*?FieldINT2 = 221;.*?\)',
|
||||
skArray, '', [fTpMtch]);
|
||||
AddFmtDef(Format('%sDynRec1%1:s', [s,s2]), '^[\(L].*?'+
|
||||
'\(.*?FieldINT1 = 200;.*?FieldINT2 = 201;.*?\), ' +
|
||||
'\(.*?FieldINT1 = 210;.*?FieldINT2 = 211;.*?\), ' +
|
||||
'\(.*?FieldINT1 = 220;.*?FieldINT2 = 221;.*?\)',
|
||||
skArray, '', [fTpMtch]);
|
||||
|
||||
if i <> 2 then // open array / TODO
|
||||
AddFmtDef(Format('%sDynRec2%1:s', [s,s2]), '^[\(L].*?'+
|
||||
'\(.*?FieldByte1 = 200;.*?FieldByte2 = 201;.*?\), ' +
|
||||
'\(.*?FieldByte1 = 210;.*?FieldByte2 = 211;.*?\), ' +
|
||||
'\(.*?FieldByte1 = 220;.*?FieldByte2 = 221;.*?\)',
|
||||
skArray, '', [fTpMtch]);
|
||||
if not (i in [2,3]) then // open array / TODO
|
||||
AddFmtDef(Format('%sDynRec2%1:s', [s,s2]), '^[\(L].*?'+
|
||||
'\(.*?FieldByte1 = 200;.*?FieldByte2 = 201;.*?\), ' +
|
||||
'\(.*?FieldByte1 = 210;.*?FieldByte2 = 211;.*?\), ' +
|
||||
'\(.*?FieldByte1 = 220;.*?FieldByte2 = 221;.*?\)',
|
||||
skArray, '', [fTpMtch]);
|
||||
|
||||
|
||||
AddFmtDef(Format('%sDynDynInt1%1:s', [s,s2]), '^[\(L].*?'+
|
||||
'\(1000, 1001, 1002\), ' + '\(1010, 1011, 1012\), ' + '\(1020, 1021, 1022\)',
|
||||
skArray, '', [fTpMtch]);
|
||||
AddSimpleInt(Format('%sDynDynInt1%1:s[0][0]', [s,s2]), 1000, M_Int);
|
||||
AddSimpleInt(Format('%sDynDynInt1%1:s[0,0]', [s,s2]), 1000, M_Int);
|
||||
AddSimpleInt(Format('%0:sDynDynInt1%1:s[%0:sDynDynInt1%1:s[3,0], %0:sDynDynInt1%1:s[3,1]]', [s,s2]), 1012, M_Int);
|
||||
AddSimpleInt(Format('%0:sDynDynInt1%1:s[%0:sDynDynInt1%1:s[3,0]][%0:sDynDynInt1%1:s[3,1]]', [s,s2]), 1012, M_Int);
|
||||
AddFmtDef(Format('%sDynDynInt1%1:s', [s,s2]), '^[\(L].*?'+
|
||||
'\(1000, 1001, 1002\), ' + '\(1010, 1011, 1012\), ' + '\(1020, 1021, 1022\)',
|
||||
skArray, '', [fTpMtch]);
|
||||
AddSimpleInt(Format('%sDynDynInt1%1:s[0][0]', [s,s2]), 1000, M_Int);
|
||||
AddSimpleInt(Format('%sDynDynInt1%1:s[0,0]', [s,s2]), 1000, M_Int);
|
||||
AddSimpleInt(Format('%0:sDynDynInt1%1:s[%0:sDynDynInt1%1:s[3,0], %0:sDynDynInt1%1:s[3,1]]', [s,s2]), 1012, M_Int);
|
||||
AddSimpleInt(Format('%0:sDynDynInt1%1:s[%0:sDynDynInt1%1:s[3,0]][%0:sDynDynInt1%1:s[3,1]]', [s,s2]), 1012, M_Int);
|
||||
|
||||
//AddFmtDef(Format('%0:sDynDynInt1%1:s[%0:sDynDynInt1%1:s[3,0].NoMember, %0:sDynDynInt1%1:s[3,1]]', [s,s2]), 'Error', skNone, '', [fTpMtch, IgnKind, fTExpectError]); // ERROR
|
||||
//AddFmtDef(Format('%0:sDynDynInt1%1:s[%0:sDynDynInt1%1:s[3,0].NoMember, %0:sDynDynInt1%1:s[3,1]]', [s,s2]), 'Error', skNone, '', [fTpMtch, IgnKind, fTExpectError]); // ERROR
|
||||
|
||||
|
||||
AddFmtDef(Format('%sDynDynClass1%1:s', [s,s2]), '^[^\(G]*?\('+ // not GDB:
|
||||
'\(\(.*?Field_INT1 = 5000;.*?\), \(.*?Field_INT1 = 5001;.*?\)\), ' +
|
||||
'\(nil, \(.*?Field_INT1 = 5011;.*?\)\), ' +
|
||||
'\(nil, nil\)',
|
||||
skArray, '', [fTpMtch]);
|
||||
AddFmtDef(Format('%sDynDynClass1%1:s', [s,s2]), '^[^\(G]*?\('+ // not GDB:
|
||||
'\(\(.*?Field_INT1 = 5000;.*?\), \(.*?Field_INT1 = 5001;.*?\)\), ' +
|
||||
'\(nil, \(.*?Field_INT1 = 5011;.*?\)\), ' +
|
||||
'\(nil, nil\)',
|
||||
skArray, '', [fTpMtch]);
|
||||
|
||||
|
||||
////
|
||||
AddFmtDef(Format('%sStatStatInt1%1:s', [s,s2]), '^[\(L].*?'+
|
||||
'\(4091, 4092, 4093\), ' + '\(4081, 4082, 4083\), ' + '\(4071, 4072, 4073\), ',
|
||||
skArray, '', [fTpMtch]);
|
||||
AddSimpleInt(Format('%sStatStatInt1%1:s[-9,1]', [s,s2]), 4091, M_Int);
|
||||
r := AddFmtDef(Format('TArrayStatStatInt(%sStatStatInt1%1:s)', [s,s2]), '^[\(L].*?'+
|
||||
'\(4091, 4092, 4093\), ' + '\(4081, 4082, 4083\), ' + '\(4071, 4072, 4073\), ',
|
||||
skArray, '', [fTpMtch]);
|
||||
if i in [3] then UpdResMinFpc(r, stSymAll, 020600);
|
||||
r := AddSimpleInt(Format('TArrayStatStatInt(%sStatStatInt1%1:s)[-9,1]', [s,s2]), 4091, M_Int);
|
||||
if i in [3] then UpdResMinFpc(r, stSymAll, 020600);
|
||||
////
|
||||
AddFmtDef(Format('%sStatStatInt1%1:s', [s,s2]), '^[\(L].*?'+
|
||||
'\(4091, 4092, 4093\), ' + '\(4081, 4082, 4083\), ' + '\(4071, 4072, 4073\), ',
|
||||
skArray, '', [fTpMtch]);
|
||||
AddSimpleInt(Format('%sStatStatInt1%1:s[-9,1]', [s,s2]), 4091, M_Int);
|
||||
r := AddFmtDef(Format('TArrayStatStatInt(%sStatStatInt1%1:s)', [s,s2]), '^[\(L].*?'+
|
||||
'\(4091, 4092, 4093\), ' + '\(4081, 4082, 4083\), ' + '\(4071, 4072, 4073\), ',
|
||||
skArray, '', [fTpMtch]);
|
||||
if i in [3] then UpdResMinFpc(r, stSymAll, 020600);
|
||||
r := AddSimpleInt(Format('TArrayStatStatInt(%sStatStatInt1%1:s)[-9,1]', [s,s2]), 4091, M_Int);
|
||||
if i in [3] then UpdResMinFpc(r, stSymAll, 020600);
|
||||
|
||||
end; // i2
|
||||
|
||||
if i in [0..4] then begin
|
||||
r := AddFmtDef(Format('@%sDynInt1', [s]), 'replaceme', skPointer, '', [fTpMtch]);
|
||||
if i = 3 then UpdResMinFpc(r, stSymAll, 020600);
|
||||
r^.OnBeforeTest := @AdjustArrayExpectToAddress;
|
||||
r^.UserData := pointer(ptruint(Length(FCurrentExpect^)));
|
||||
AddFmtDef(Format('%sPDynInt1', [s]), '\$[0-9A-F]', skPointer, '', [fTpMtch]);
|
||||
|
||||
r := AddFmtDef(Format('@%sStatInt1', [s]), 'replaceme', skPointer, '', [fTpMtch]);
|
||||
if i = 3 then UpdResMinFpc(r, stSymAll, 020600);
|
||||
r^.OnBeforeTest := @AdjustArrayExpectToAddress;
|
||||
r^.UserData := pointer(ptruint(Length(FCurrentExpect^)));
|
||||
AddFmtDef(Format('%sPStatInt1', [s]), '\$[0-9A-F]', skPointer, '', [fTpMtch]);
|
||||
|
||||
end;
|
||||
|
||||
end;
|
||||
end; // i
|
||||
{%endregion Fields }
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user