Debugger: Fix bitsize for pointer

Change-Id: Icb3fe3dafbff75cba72758459d760470e01afb9b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2016-10-13 09:36:03 +02:00
parent 034f1728ea
commit b0ea129299

View File

@@ -112,7 +112,9 @@ PyObject *type_bitSize(Type *self)
{
ULONG size;
auto extcmd = ExtensionCommandContext::instance();
if (FAILED(extcmd->symbols()->GetTypeSize(self->m_module, self->m_typeId, &size)))
if (endsWith(getTypeName(self), '*'))
size = SUCCEEDED(ExtensionCommandContext::instance()->control()->IsPointer64Bit()) ? 8 : 4;
else if (FAILED(extcmd->symbols()->GetTypeSize(self->m_module, self->m_typeId, &size)))
return NULL;
return Py_BuildValue("k", size * 8);
}