Commit b0cbed9a authored by Christian Stenger's avatar Christian Stenger

Dumper: Do not use enumHexDisplay unconditionally

This function is available only for GDB. When using CDB or LLDB
this ends up in an exception.

Change-Id: Ie1835c1b95cac99e3f996077f6a3d80b5591c145
Reviewed-by: David Schulz's avatarDavid Schulz <david.schulz@qt.io>
Reviewed-by: default avatarhjk <hjk@qt.io>
parent 16ca76d8
......@@ -2743,7 +2743,10 @@ class DumperBase:
#warn('BITFIELD VALUE: %s %d %s' % (value.name, value.lvalue, typeName))
self.putNumChild(0)
if typeobj.ltarget and typeobj.ltarget.code == TypeCodeEnum:
self.putValue(typeobj.ltarget.typeData().enumHexDisplay(value.lvalue, value.laddress))
if hasattr(typeobj.ltarget.typeData(), 'enumHexDisplay'):
self.putValue(typeobj.ltarget.typeData().enumHexDisplay(value.lvalue, value.laddress))
else:
self.putValue(typeobj.ltarget.typeData().enumDisplay(value.lvalue, value.laddress))
else:
self.putValue(value.lvalue)
self.putType(typeName)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment