mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 03:56:12 +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;
|
ExistingNode, nd: PVirtualNode;
|
||||||
ChildInfo: TWatchResultDataFieldInfo;
|
ChildInfo: TWatchResultDataFieldInfo;
|
||||||
AnchClass: String;
|
AnchClass: String;
|
||||||
|
IsGdbmiArray: Boolean;
|
||||||
begin
|
begin
|
||||||
ChildCount := 0;
|
ChildCount := 0;
|
||||||
|
|
||||||
@ -1500,12 +1501,16 @@ begin
|
|||||||
AWatch := AWatchValue.Watch;
|
AWatch := AWatchValue.Watch;
|
||||||
|
|
||||||
if (TypInfo <> nil) and (TypInfo.Fields <> nil) then begin
|
if (TypInfo <> nil) and (TypInfo.Fields <> nil) then begin
|
||||||
|
IsGdbmiArray := TypInfo.Attributes * [saDynArray, saArray] <> [];
|
||||||
ChildCount := TypInfo.Fields.Count;
|
ChildCount := TypInfo.Fields.Count;
|
||||||
ExistingNode := tvWatches.GetFirstChildNoInit(VNode);
|
ExistingNode := tvWatches.GetFirstChildNoInit(VNode);
|
||||||
|
|
||||||
AnchClass := TypInfo.TypeName;
|
AnchClass := TypInfo.TypeName;
|
||||||
for i := 0 to TypInfo.Fields.Count-1 do begin
|
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
|
if NewWatch = nil then begin
|
||||||
dec(ChildCount);
|
dec(ChildCount);
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user