diff options
author | David Schulz <david.schulz@qt.io> | 2018-08-08 12:11:04 +0200 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2018-08-09 08:30:37 +0000 |
commit | 975f5886a6f09b48efc052bee5aae43613492e04 (patch) | |
tree | a21a16317b44d12457df8abfab1465a74e458fc6 | |
parent | d94cd5afcd34a35e3506d0b8d3d83a6a4499222a (diff) | |
download | qt-creator-975f5886a6f09b48efc052bee5aae43613492e04.tar.gz |
Debugger: fix cdb enum dumper
Change-Id: Iac407d98afd8f024a45d0f6550c8b3c00df0a515
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
-rw-r--r-- | share/qtcreator/debugger/cdbbridge.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/share/qtcreator/debugger/cdbbridge.py b/share/qtcreator/debugger/cdbbridge.py index 00a9130641..ee2c255d2f 100644 --- a/share/qtcreator/debugger/cdbbridge.py +++ b/share/qtcreator/debugger/cdbbridge.py @@ -93,6 +93,11 @@ class Dumper(DumperBase): self.outputLock = threading.Lock() 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): self.check(isinstance(nativeValue, cdbext.Value)) val = self.Value(self) @@ -123,6 +128,8 @@ class Dumper(DumperBase): except: # read raw memory in case the integerString can not be interpreted pass + if val.type.code == TypeCodeEnum: + val.ldisplay = enumValue(nativeValue) val.isBaseClass = val.name == val.type.name val.nativeValue = nativeValue val.laddress = nativeValue.address() @@ -212,9 +219,7 @@ class Dumper(DumperBase): value = cdbext.createValue(addr, nativeType) if value is None: return '' - enumDisplay = value.nativeDebuggerValue() - # remove '0n' decimal prefix of the native cdb value output - return enumDisplay.replace('(0n', '(') + return enumDisplay(value) def enumExpression(self, enumType, enumValue): ns = self.qtNamespace() |