forked from qt-creator/qt-creator
Debugger: fix cdb enum dumper
Change-Id: Iac407d98afd8f024a45d0f6550c8b3c00df0a515 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -93,6 +93,11 @@ class Dumper(DumperBase):
|
|||||||
self.outputLock = threading.Lock()
|
self.outputLock = threading.Lock()
|
||||||
self.isCdb = True
|
self.isCdb = True
|
||||||
|
|
||||||
|
def enumValue(self, nativeValue):
|
||||||
|
val = nativeValue.nativeDebuggerValue()
|
||||||
|
# remove '0n' decimal prefix of the native cdb value output
|
||||||
|
return val.replace('(0n', '(')
|
||||||
|
|
||||||
def fromNativeValue(self, nativeValue):
|
def fromNativeValue(self, nativeValue):
|
||||||
self.check(isinstance(nativeValue, cdbext.Value))
|
self.check(isinstance(nativeValue, cdbext.Value))
|
||||||
val = self.Value(self)
|
val = self.Value(self)
|
||||||
@@ -123,6 +128,8 @@ class Dumper(DumperBase):
|
|||||||
except:
|
except:
|
||||||
# read raw memory in case the integerString can not be interpreted
|
# read raw memory in case the integerString can not be interpreted
|
||||||
pass
|
pass
|
||||||
|
if val.type.code == TypeCodeEnum:
|
||||||
|
val.ldisplay = enumValue(nativeValue)
|
||||||
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()
|
||||||
@@ -212,9 +219,7 @@ class Dumper(DumperBase):
|
|||||||
value = cdbext.createValue(addr, nativeType)
|
value = cdbext.createValue(addr, nativeType)
|
||||||
if value is None:
|
if value is None:
|
||||||
return ''
|
return ''
|
||||||
enumDisplay = value.nativeDebuggerValue()
|
return enumDisplay(value)
|
||||||
# remove '0n' decimal prefix of the native cdb value output
|
|
||||||
return enumDisplay.replace('(0n', '(')
|
|
||||||
|
|
||||||
def enumExpression(self, enumType, enumValue):
|
def enumExpression(self, enumType, enumValue):
|
||||||
ns = self.qtNamespace()
|
ns = self.qtNamespace()
|
||||||
|
Reference in New Issue
Block a user