forked from qt-creator/qt-creator
Debugger: Fix bitsize for pointer
Change-Id: Icb3fe3dafbff75cba72758459d760470e01afb9b Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -112,7 +112,9 @@ PyObject *type_bitSize(Type *self)
|
|||||||
{
|
{
|
||||||
ULONG size;
|
ULONG size;
|
||||||
auto extcmd = ExtensionCommandContext::instance();
|
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 NULL;
|
||||||
return Py_BuildValue("k", size * 8);
|
return Py_BuildValue("k", size * 8);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user