forked from qt-creator/qt-creator
Debugger: Add public pointer size function
Change-Id: I5f60d1b7eca1c036a00dea92887f37687337627e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -75,8 +75,7 @@ static PyObject *cdbext_listOfLocals(PyObject *, PyObject *) // -> [ Value ]
|
||||
|
||||
static PyObject *cdbext_pointerSize(PyObject *, PyObject *)
|
||||
{
|
||||
HRESULT isPointer64Bit = ExtensionCommandContext::instance()->control()->IsPointer64Bit();
|
||||
return Py_BuildValue("i", isPointer64Bit == S_OK ? 8 : 4);
|
||||
return Py_BuildValue("i", pointerSize());
|
||||
}
|
||||
|
||||
static PyObject *cdbext_readRawMemory(PyObject *, PyObject *args)
|
||||
@@ -200,3 +199,8 @@ PyObject *pyBool(bool b)
|
||||
else
|
||||
Py_RETURN_FALSE;
|
||||
}
|
||||
|
||||
int pointerSize()
|
||||
{
|
||||
return ExtensionCommandContext::instance()->control()->IsPointer64Bit() == S_OK ? 8 : 4;
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
void initCdbextPythonModule();
|
||||
|
||||
PyObject *pyBool(bool);
|
||||
int pointerSize();
|
||||
|
||||
constexpr bool debugPyCdbextModule = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user