Debugger: Make display of QObject names optional

... and switch it off by default. The feature has indeterministic
performance impact and lost quite a bit of its utility since GDB
learned to extract dynamic object types most of the times.

Change-Id: I22cccb03ba67f9ff6ad757bbc06eb372d84bbffe
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
hjk
2015-12-16 14:13:44 +01:00
parent e5b9e819fa
commit 6a71c63186
10 changed files with 47 additions and 15 deletions
+8 -3
View File
@@ -254,6 +254,7 @@ class Dumper(DumperBase):
self.useFancy = int(args.get("fancy", "0"))
self.forceQtNamespace = int(args.get("forcens", "0"))
self.passExceptions = int(args.get("passexceptions", "0"))
self.showQObjectNames = int(args.get("qobjectnames", "0"))
self.nativeMixed = int(args.get("nativemixed", "0"))
self.autoDerefPointers = int(args.get("autoderef", "0"))
self.partialUpdate = int(args.get("partial", "0"))
@@ -1115,9 +1116,10 @@ class Dumper(DumperBase):
#warn("INAME: %s " % self.currentIName)
#warn("INAMES: %s " % self.expandedINames)
#warn("EXPANDED: %s " % (self.currentIName in self.expandedINames))
staticMetaObject = self.extractStaticMetaObject(value.type)
if staticMetaObject:
self.putQObjectNameValue(value)
if self.showQObjectNames:
staticMetaObject = self.extractStaticMetaObject(value.type)
if staticMetaObject:
self.putQObjectNameValue(value)
self.putType(typeName)
self.putEmptyValue()
self.putNumChild(len(typeobj.fields()))
@@ -1126,6 +1128,8 @@ class Dumper(DumperBase):
innerType = None
with Children(self, 1, childType=innerType):
self.putFields(value)
if not self.showQObjectNames:
staticMetaObject = self.extractStaticMetaObject(value.type)
if staticMetaObject:
self.putQObjectGuts(value, staticMetaObject)
@@ -1801,6 +1805,7 @@ class CliDumper(Dumper):
args['fancy'] = 1
args['passexception'] = 1
args['autoderef'] = 1
args['qobjectnames'] = 1
name = args['varlist']
self.prepare(args)
self.output = name + ' = '