mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 02:58:05 +02:00
IdeDebugger: Watches, fix handling old "TDBGType" for expanding arrays
This commit is contained in:
parent
dd5d291621
commit
24e9f48caa
@ -1448,6 +1448,7 @@ var
|
||||
ExistingNode, nd: PVirtualNode;
|
||||
ChildInfo: TWatchResultDataFieldInfo;
|
||||
AnchClass: String;
|
||||
IsGdbmiArray: Boolean;
|
||||
begin
|
||||
ChildCount := 0;
|
||||
|
||||
@ -1500,12 +1501,16 @@ begin
|
||||
AWatch := AWatchValue.Watch;
|
||||
|
||||
if (TypInfo <> nil) and (TypInfo.Fields <> nil) then begin
|
||||
IsGdbmiArray := TypInfo.Attributes * [saDynArray, saArray] <> [];
|
||||
ChildCount := TypInfo.Fields.Count;
|
||||
ExistingNode := tvWatches.GetFirstChildNoInit(VNode);
|
||||
|
||||
AnchClass := TypInfo.TypeName;
|
||||
for i := 0 to TypInfo.Fields.Count-1 do begin
|
||||
NewWatch := AWatchValue.ChildrenByNameAsField[TypInfo.Fields[i].Name, AnchClass];
|
||||
if IsGdbmiArray then
|
||||
NewWatch := AWatchValue.ChildrenByNameAsArrayEntry[StrToInt64Def(TypInfo.Fields[i].Name, 0)]
|
||||
else
|
||||
NewWatch := AWatchValue.ChildrenByNameAsField[TypInfo.Fields[i].Name, AnchClass];
|
||||
if NewWatch = nil then begin
|
||||
dec(ChildCount);
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user