Debugger: Pass uninitialized variables to the python dumpers

Reduces accessing uninitialized memory

Change-Id: I025e9070b9b17a806237619b484cb27230e7f494
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2017-03-30 09:15:48 +02:00
parent 8c86400329
commit c00bb1dcfb
3 changed files with 12 additions and 2 deletions

View File

@@ -125,7 +125,6 @@ class Dumper(DumperBase):
pass
val.isBaseClass = val.name == val.type.name
val.nativeValue = nativeValue
val.lIsInScope = True
val.laddress = nativeValue.address()
return val
@@ -440,7 +439,9 @@ class Dumper(DumperBase):
variables = []
for val in cdbext.listOfLocals(self.partialVariable):
variables.append(self.fromNativeValue(val))
dumperVal = self.fromNativeValue(val)
dumperVal.lIsInScope = not dumperVal.name in self.uninitialized
variables.append(dumperVal)
self.handleLocals(variables)
self.handleWatches(args)

View File

@@ -317,6 +317,8 @@ class DumperBase:
self.nativeMixed = int(args.get('nativemixed', '0'))
self.autoDerefPointers = int(args.get('autoderef', '0'))
self.partialVariable = args.get('partialvar', '')
self.uninitialized = args.get('uninitialized', [])
self.uninitialized = list(map(lambda x: self.hexdecode(x), self.uninitialized))
self.partialUpdate = int(args.get('partial', '0'))
self.fallbackQtVersion = 0x50200
#warn('NAMESPACE: "%s"' % self.qtNamespace())