Debugger: add <load more> functionality to array dumper

Change-Id: Ib44748fa3218788ca20a99b0a0f4cd85716dde06
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
David Schulz
2023-02-21 15:32:13 +01:00
parent 8ecd8692bf
commit 5169469911
10 changed files with 82 additions and 37 deletions

View File

@@ -212,6 +212,13 @@ public:
child->valueEditable = true;
item->appendChild(child);
}
if (childrenElided) {
auto child = new WatchItem;
child->name = WatchItem::loadMoreName;
child->iname = item->iname + "." + WatchItem::loadMoreName;
child->wantsChildren = true;
item->appendChild(child);
}
}
void decode()
@@ -260,6 +267,7 @@ public:
QString rawData;
QString childType;
DebuggerEncoding encoding;
int childrenElided;
quint64 addrbase;
quint64 addrstep;
Endian endian;
@@ -375,6 +383,7 @@ void WatchItem::parseHelper(const GdbMi &input, bool maySort)
decoder.item = this;
decoder.rawData = mi.data();
decoder.childType = input["childtype"].data();
decoder.childrenElided = input["childrenelided"].toInt();
decoder.addrbase = input["addrbase"].toAddress();
decoder.addrstep = input["addrstep"].toAddress();
decoder.endian = input["endian"].data() == ">" ? Endian::Big : Endian::Little;
@@ -500,6 +509,11 @@ QString WatchItem::toToolTip() const
return res;
}
bool WatchItem::isLoadMore() const
{
return name == loadMoreName;
}
bool WatchItem::isLocal() const
{
if (arrayIndex >= 0)