I have a C++ project which was written by others, which calls python code at the end of the execution.
In the C++ initializer, it defines a pHandle:
pHandle_ = PyObject_CallObject(pLoad_, NULL);
PyGILState_Release(gstate);
Then it calls python code this way:
PyObject *pyValue = PyObject_CallObject(pProcess_, pArgs);
pProcess_ and pArgs are created earlier. The python code's file name is 'runLogic.py' and the function executed in runLogic.py is 'process()'.
Is there a way to break into the python's process() function while I debug in c++ through GDB? In C++ code, I can step through until the line above, copied again below: PyObject *pyValue = PyObject_CallObject(pProcess_, pArgs);
Then I don't know how to jump into the Python's function.
Is there a way to do that? I want to trace the full logic of the code, in addition to C++'s code.