aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/qtcreatorcdbext
diff options
context:
space:
mode:
authorDavid Schulz <[email protected]>2024-02-16 08:41:47 +0100
committerDavid Schulz <[email protected]>2024-02-19 10:06:03 +0000
commit95bad0c91d22b6c1ded3c957f94b02be549ae5ed (patch)
tree155a96cf1562365a2d7fb99d88e6b5066474815a /src/libs/qtcreatorcdbext
parent0a2b6a910acd8d75bb14c1860c60c248aa5e073e (diff)
Debugger: add more debug output to the python cdbext module
Change-Id: I48b4fb6a65eb486b190238ff161ea358bf4d3bf5 Reviewed-by: <[email protected]> Reviewed-by: Christian Stenger <[email protected]>
Diffstat (limited to 'src/libs/qtcreatorcdbext')
-rw-r--r--src/libs/qtcreatorcdbext/pycdbextmodule.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/libs/qtcreatorcdbext/pycdbextmodule.cpp b/src/libs/qtcreatorcdbext/pycdbextmodule.cpp
index bf3c379272d..68b9eb334c9 100644
--- a/src/libs/qtcreatorcdbext/pycdbextmodule.cpp
+++ b/src/libs/qtcreatorcdbext/pycdbextmodule.cpp
@@ -101,6 +101,9 @@ static PyObject *cdbext_resolveSymbol(PyObject *, PyObject *args) // -> Value
if (!PyArg_ParseTuple(args, "s", &pattern))
Py_RETURN_NONE;
+ if (debugPyCdbextModule)
+ DebugPrint() << "resolve symbol: " << pattern;
+
CIDebugSymbols *symbols = ExtensionCommandContext::instance()->symbols();
auto rc = PyList_New(0);
@@ -132,6 +135,9 @@ static PyObject *cdbext_getNameByAddress(PyObject *, PyObject *args)
if (!PyArg_ParseTuple(args, "K", &address))
Py_RETURN_NONE;
+ if (debugPyCdbextModule)
+ DebugPrint() << "name by address: " << address;
+
CIDebugSymbols *symbols = ExtensionCommandContext::instance()->symbols();
PyObject* ret = NULL;
@@ -153,6 +159,9 @@ static PyObject *cdbext_getAddressByName(PyObject *, PyObject *args)
if (!PyArg_ParseTuple(args, "s", &name))
Py_RETURN_NONE;
+ if (debugPyCdbextModule)
+ DebugPrint() << "address by name: " << name;
+
CIDebugSymbols *symbols = ExtensionCommandContext::instance()->symbols();
ULONG64 address = 0;
@@ -177,6 +186,14 @@ static PyObject *cdbext_listOfLocals(PyObject *, PyObject *args) // -> [ Value ]
Py_RETURN_NONE;
const std::string partialVariable(partialVariablesC);
+
+ if (debugPyCdbextModule) {
+ if (partialVariable.empty())
+ DebugPrint() << "list of locals";
+ else
+ DebugPrint() << "list of locals with partial variable: " << partialVariable;
+ }
+
IDebugSymbolGroup2 *symbolGroup = nullptr;
auto locals = PyList_New(0);
if (partialVariable.empty()) {