forked from qt-creator/qt-creator
Debugger [gdb/win]: Use calloc instead of malloc for QObject-properties
Avoid symbol clash with QVector::malloc. Display at least property count. Reviewed-by: hjk
This commit is contained in:
@@ -723,7 +723,8 @@ def qdump__QObject(d, item):
|
||||
if d.isExpandedIName(item.iname + ".properties"):
|
||||
# FIXME: Make this global. Don't leak.
|
||||
variant = "'%sQVariant'" % d.ns
|
||||
gdb.execute("set $d = (%s*)malloc(sizeof(%s))" % (variant, variant))
|
||||
# Avoid malloc symbol clash with QVector
|
||||
gdb.execute("set $d = (%s*)calloc(sizeof(%s), 1)" % (variant, variant))
|
||||
gdb.execute("set $d.d.is_shared = 0")
|
||||
|
||||
with Children(d, [propertyCount, 500]):
|
||||
|
||||
Reference in New Issue
Block a user