forked from qt-creator/qt-creator
Debugger: Fix highlighting values and members in memory view
Fixes: QTCREATORBUG-23681 Change-Id: I1420385d0c923be0ae4dd7ef2662263b88623333 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -118,6 +118,7 @@ class Dumper(DumperBase):
|
|||||||
val.isBaseClass = val.name == val._type.name
|
val.isBaseClass = val.name == val._type.name
|
||||||
val.nativeValue = nativeValue
|
val.nativeValue = nativeValue
|
||||||
val.laddress = nativeValue.address()
|
val.laddress = nativeValue.address()
|
||||||
|
val.lbitsize = nativeValue.bitsize()
|
||||||
return val
|
return val
|
||||||
|
|
||||||
def nativeTypeId(self, nativeType):
|
def nativeTypeId(self, nativeType):
|
||||||
|
@@ -2792,6 +2792,8 @@ class DumperBase():
|
|||||||
return
|
return
|
||||||
|
|
||||||
self.putAddress(value.address())
|
self.putAddress(value.address())
|
||||||
|
if value.lbitsize is not None:
|
||||||
|
self.putField('size', value.lbitsize // 8)
|
||||||
|
|
||||||
if typeobj.code == TypeCode.Function:
|
if typeobj.code == TypeCode.Function:
|
||||||
#DumperBase.warn('FUNCTION VALUE: %s' % value)
|
#DumperBase.warn('FUNCTION VALUE: %s' % value)
|
||||||
|
@@ -1427,15 +1427,15 @@ int WatchModel::memberVariableRecursion(WatchItem *item,
|
|||||||
const QString nameRoot = name.isEmpty() ? name : name + '.';
|
const QString nameRoot = name.isEmpty() ? name : name + '.';
|
||||||
for (int r = 0; r < rows; r++) {
|
for (int r = 0; r < rows; r++) {
|
||||||
WatchItem *child = item->childAt(r);
|
WatchItem *child = item->childAt(r);
|
||||||
const quint64 childAddress = item->address;
|
const quint64 childAddress = child->address;
|
||||||
if (childAddress && childAddress >= start
|
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 QString childName = nameRoot + child->name;
|
||||||
const quint64 childOffset = childAddress - start;
|
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 ColorNumberToolTip colorNumberNamePair((*colorNumberIn)++, toolTip);
|
||||||
const ColorNumberToolTips::iterator begin = cnmv->begin() + childOffset;
|
const ColorNumberToolTips::iterator begin = cnmv->begin() + childOffset;
|
||||||
std::fill(begin, begin + item->size, colorNumberNamePair);
|
std::fill(begin, begin + child->size, colorNumberNamePair);
|
||||||
childCount++;
|
childCount++;
|
||||||
childCount += memberVariableRecursion(child, childName, start, end, colorNumberIn, cnmv);
|
childCount += memberVariableRecursion(child, childName, start, end, colorNumberIn, cnmv);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user