Commit 696b2d42 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

Debugger: Fix extremely slow enum name resolving

Task-number: QTCREATORBUG-17598
Change-Id: Ib32586c0513ce058301c1187e263c17b0a716f94
Reviewed-by: default avatarhjk <hjk@qt.io>
parent 2b50fec7
......@@ -379,10 +379,12 @@ class Dumper(DumperBase):
def nativeTypeEnumDisplay(self, nativeType, intval):
try:
val = gdb.parse_and_eval('(%s)%d' % (nativeType, intval))
return '%s (%d)' % (val, intval)
for field in nativeType.fields():
if field.enumval == intval:
return '%s (%d)' % (field.name, intval)
except:
return '%d' % intval
pass
return '%d' % intval
def nativeTypeId(self, nativeType):
name = str(nativeType)
......
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