Debugger: Show enum symbolic names also with GDB 7.4

gdb.Type.name is not available there, but str() works.

Change-Id: I61c3018e728e634509d4028f624dc1213c62a290
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2016-09-16 13:46:19 +02:00
committed by hjk
parent 397b4144d4
commit 080d2dad65

View File

@@ -381,7 +381,7 @@ class Dumper(DumperBase):
def nativeTypeEnumDisplay(self, nativeType, intval):
try:
val = gdb.parse_and_eval("(%s)%d" % (nativeType.name, intval))
val = gdb.parse_and_eval("(%s)%d" % (nativeType, intval))
return "%s (%d)" % (val, intval)
except:
return "%d" % intval