forked from qt-creator/qt-creator
Debugger: remove put item code from cdbbridge
unneeded nowadays Change-Id: I8e7d46f7344157459e86cbea95563194a579cd6e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -501,133 +501,8 @@ class Dumper(DumperBase):
|
|||||||
res = self.nativeParseAndEvaluate(symbolName)
|
res = self.nativeParseAndEvaluate(symbolName)
|
||||||
return None if res is None else res.address()
|
return None if res is None else res.address()
|
||||||
|
|
||||||
def putItem(self, value: DumperBase.Value):
|
def wantQObjectNames(self):
|
||||||
|
return self.showQObjectNames and self.qtCoreModuleName() is not None
|
||||||
typeobj = value.type # unqualified()
|
|
||||||
typeName = typeobj.name
|
|
||||||
|
|
||||||
if not value.lIsInScope:
|
|
||||||
self.putSpecialValue('optimizedout')
|
|
||||||
#self.putType(typeobj)
|
|
||||||
#self.putSpecialValue('outofscope')
|
|
||||||
self.putNumChild(0)
|
|
||||||
return
|
|
||||||
|
|
||||||
if not isinstance(value, self.Value):
|
|
||||||
raise RuntimeError('WRONG TYPE IN putItem: %s' % type(self.Value))
|
|
||||||
|
|
||||||
# Try on possibly typedefed type first.
|
|
||||||
if self.tryPutPrettyItem(typeName, value):
|
|
||||||
if typeobj.code == TypeCode.Pointer:
|
|
||||||
self.putOriginalAddress(value.address())
|
|
||||||
else:
|
|
||||||
self.putAddress(value.address())
|
|
||||||
return
|
|
||||||
|
|
||||||
if typeobj.code == TypeCode.Pointer:
|
|
||||||
self.putFormattedPointer(value)
|
|
||||||
return
|
|
||||||
|
|
||||||
self.putAddress(value.address())
|
|
||||||
|
|
||||||
if typeobj.code == TypeCode.Function:
|
|
||||||
#DumperBase.warn('FUNCTION VALUE: %s' % value)
|
|
||||||
self.putType(typeobj)
|
|
||||||
self.putSymbolValue(value.pointer())
|
|
||||||
self.putNumChild(0)
|
|
||||||
return
|
|
||||||
|
|
||||||
if typeobj.code == TypeCode.Enum:
|
|
||||||
#DumperBase.warn('ENUM VALUE: %s' % value.stringify())
|
|
||||||
self.putType(typeobj.name)
|
|
||||||
self.putValue(value.display())
|
|
||||||
self.putNumChild(0)
|
|
||||||
return
|
|
||||||
|
|
||||||
if typeobj.code == TypeCode.Array:
|
|
||||||
#DumperBase.warn('ARRAY VALUE: %s' % value)
|
|
||||||
self.putCStyleArray(value)
|
|
||||||
return
|
|
||||||
|
|
||||||
if typeobj.code == TypeCode.Integral:
|
|
||||||
#DumperBase.warn('INTEGER: %s %s' % (value.name, value))
|
|
||||||
val = value.value()
|
|
||||||
self.putNumChild(0)
|
|
||||||
self.putValue(val)
|
|
||||||
self.putType(typeName)
|
|
||||||
return
|
|
||||||
|
|
||||||
if typeobj.code == TypeCode.Float:
|
|
||||||
#DumperBase.warn('FLOAT VALUE: %s' % value)
|
|
||||||
self.putValue(value.value())
|
|
||||||
self.putNumChild(0)
|
|
||||||
self.putType(typeobj.name)
|
|
||||||
return
|
|
||||||
|
|
||||||
if typeobj.code in (TypeCode.Reference, TypeCode.RValueReference):
|
|
||||||
#DumperBase.warn('REFERENCE VALUE: %s' % value)
|
|
||||||
val = value.dereference()
|
|
||||||
if val.laddress != 0:
|
|
||||||
self.putItem(val)
|
|
||||||
else:
|
|
||||||
self.putSpecialValue('nullreference')
|
|
||||||
self.putBetterType(typeName)
|
|
||||||
return
|
|
||||||
|
|
||||||
if typeobj.code == TypeCode.Complex:
|
|
||||||
self.putType(typeobj)
|
|
||||||
self.putValue(value.display())
|
|
||||||
self.putNumChild(0)
|
|
||||||
return
|
|
||||||
|
|
||||||
self.putType(typeName)
|
|
||||||
|
|
||||||
if value.summary is not None and self.useFancy:
|
|
||||||
self.putValue(self.hexencode(value.summary), 'utf8:1:0')
|
|
||||||
self.putNumChild(0)
|
|
||||||
return
|
|
||||||
|
|
||||||
self.putExpandable()
|
|
||||||
self.putEmptyValue()
|
|
||||||
#DumperBase.warn('STRUCT GUTS: %s ADDRESS: 0x%x ' % (value.name, value.address()))
|
|
||||||
if self.showQObjectNames:
|
|
||||||
#with self.timer(self.currentIName):
|
|
||||||
self.putQObjectNameValue(value)
|
|
||||||
if self.isExpanded():
|
|
||||||
self.putField('sortable', 1)
|
|
||||||
with Children(self):
|
|
||||||
baseIndex = 0
|
|
||||||
for item in self.listValueChildren(value):
|
|
||||||
if item.name.startswith('__vfptr'):
|
|
||||||
with SubItem(self, '[vptr]'):
|
|
||||||
# int (**)(void)
|
|
||||||
self.putType(' ')
|
|
||||||
self.putSortGroup(20)
|
|
||||||
self.putValue(item.name)
|
|
||||||
n = 100
|
|
||||||
if self.isExpanded():
|
|
||||||
with Children(self):
|
|
||||||
n = self.putVTableChildren(item, n)
|
|
||||||
self.putNumChild(n)
|
|
||||||
continue
|
|
||||||
|
|
||||||
if item.isBaseClass:
|
|
||||||
baseIndex += 1
|
|
||||||
# We cannot use nativeField.name as part of the iname as
|
|
||||||
# it might contain spaces and other strange characters.
|
|
||||||
with UnnamedSubItem(self, "@%d" % baseIndex):
|
|
||||||
self.putField('iname', self.currentIName)
|
|
||||||
self.putField('name', '[%s]' % item.name)
|
|
||||||
self.putSortGroup(1000 - baseIndex)
|
|
||||||
self.putAddress(item.address())
|
|
||||||
self.putItem(item)
|
|
||||||
continue
|
|
||||||
|
|
||||||
|
|
||||||
with SubItem(self, item.name):
|
|
||||||
self.putItem(item)
|
|
||||||
if self.showQObjectNames:
|
|
||||||
self.tryPutQObjectGuts(value)
|
|
||||||
|
|
||||||
def fetchInternalFunctions(self):
|
def fetchInternalFunctions(self):
|
||||||
coreModuleName = self.qtCoreModuleName()
|
coreModuleName = self.qtCoreModuleName()
|
||||||
|
Reference in New Issue
Block a user