diff --git a/share/qtcreator/debugger/cdbbridge.py b/share/qtcreator/debugger/cdbbridge.py index 8e5241e934a..f19d8dedf9b 100644 --- a/share/qtcreator/debugger/cdbbridge.py +++ b/share/qtcreator/debugger/cdbbridge.py @@ -118,6 +118,7 @@ class Dumper(DumperBase): val.isBaseClass = val.name == val._type.name val.nativeValue = nativeValue val.laddress = nativeValue.address() + val.lbitsize = nativeValue.bitsize() return val def nativeTypeId(self, nativeType): diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py index 42b2a8c829f..84008943031 100644 --- a/share/qtcreator/debugger/dumper.py +++ b/share/qtcreator/debugger/dumper.py @@ -2792,6 +2792,8 @@ class DumperBase(): return self.putAddress(value.address()) + if value.lbitsize is not None: + self.putField('size', value.lbitsize // 8) if typeobj.code == TypeCode.Function: #DumperBase.warn('FUNCTION VALUE: %s' % value) diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp index 371f7fe4975..17ce07bee04 100644 --- a/src/plugins/debugger/watchhandler.cpp +++ b/src/plugins/debugger/watchhandler.cpp @@ -1427,15 +1427,15 @@ int WatchModel::memberVariableRecursion(WatchItem *item, const QString nameRoot = name.isEmpty() ? name : name + '.'; for (int r = 0; r < rows; r++) { WatchItem *child = item->childAt(r); - const quint64 childAddress = item->address; + const quint64 childAddress = child->address; if (childAddress && childAddress >= start - && (childAddress + item->size) <= end) { // Non-static, within area? + && (childAddress + child->size) <= end) { // Non-static, within area? const QString childName = nameRoot + child->name; const quint64 childOffset = childAddress - start; - const QString toolTip = variableToolTip(childName, item->type, childOffset); + const QString toolTip = variableToolTip(childName, child->type, childOffset); const ColorNumberToolTip colorNumberNamePair((*colorNumberIn)++, toolTip); const ColorNumberToolTips::iterator begin = cnmv->begin() + childOffset; - std::fill(begin, begin + item->size, colorNumberNamePair); + std::fill(begin, begin + child->size, colorNumberNamePair); childCount++; childCount += memberVariableRecursion(child, childName, start, end, colorNumberIn, cnmv); }