小编Luk*_*uke的帖子

如何使用 GDB 获取 python 堆栈跟踪信息?

我正在使用 GDB 调试 Kubuntu 12.04 上我的 python 应用程序中的分段错误。据说 GDB 版本 7 具有用于提取有关 python 堆栈的信息的内置宏 (http://docs.python.org/devguide/gdb.html),但我无法让它工作。我已经安装了 python-dbg。

当我在 GDB 中请求 python 堆栈跟踪时,结果如下所示:

(gdb) py-bt
#5 (unable to read python frame information)
#16 (unable to read python frame information)
#26 (unable to read python frame information)
...
Run Code Online (Sandbox Code Playgroud)

我的 GDB 版本是 7.4-2012.04-0ubuntu2,Python 是 2.7.3-0ubuntu3。

python gdb

13
推荐指数
2
解决办法
2万
查看次数

标签 统计

gdb ×1

python ×1