From d40007938c721b4985cd4ee88baedbd935971a6c Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 1 Oct 2010 17:43:23 +0200 Subject: [PATCH] debugger: fix QObject property dumping on Windows The problem of gdb finding QVector::malloc instead of the global malloc appeared again. The workaorund is to use calloc which is not used by Qt. However, for transfering string literal data to the inferior gdb uses malloc internally outside our control, so we cannot use string literals in inferior calls at all. In the particular case of QObject property names we are lucky as the data already exists in the inferior memory. This patch just uses it. Reviewed-by: Leandro Melo Task: QTCREATORBUG-2533 --- share/qtcreator/gdbmacros/gdbmacros.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/qtcreator/gdbmacros/gdbmacros.py b/share/qtcreator/gdbmacros/gdbmacros.py index e3574f5325..0a0bcec04d 100644 --- a/share/qtcreator/gdbmacros/gdbmacros.py +++ b/share/qtcreator/gdbmacros/gdbmacros.py @@ -770,7 +770,8 @@ def qdump__QObject(d, item): # % (d.ns, item.value.address, propertyName) #exp = '"((\'%sQObject\'*)%s)"' % (d.ns, item.value.address,) #warn("EXPRESSION: %s" % exp) - value = call(item.value, 'property("%s")' % propertyName) + value = call(item.value, 'property(%s)' + % cleanAddress(metaStringData + metaData[offset])) value1 = value["d"] #warn(" CODE: %s" % value1["type"]) # Type 1 and 2 are bool and int. Try to save a few cycles in this case: -- 2.11.0