Cで書いたPythonの拡張モジュールをデバッグしようとしています。次を使用してコンパイルしました。
python setup.py build -g install --user
次に、次のコマンドでデバッグします。
gdb python
...
b py_node_make
run test.py
py_node_make(私が定義した関数の1つ)で壊れますが、それから私は試します:
(gdb) print node
No symbol "node" in current context.
私がデバッグしようとしている関数は次のとおりです。
static Python_node_t* py_node_make(
node_t* node)
{
Python_node_t* pyNode;
pyNode = PyObject_New(Python_node_t, &t_node);
pyNode->node = node;
pyNode->borrowed = true;
return pyNode;
}