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:
Friedemann Kleint
2010-09-30 12:16:41 +02:00
parent 36709fd20f
commit 44d87bf85d
2 changed files with 4 additions and 2 deletions

View File

@@ -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]):