我遇到了在gdb中使用特定于
python的命令的问题.我有一般的python支持包括:
(gdb) python print(True)
True
我已经安装了标准脚本:
$ls /usr/share/gdb/python/gdb/
command FrameDecorator.py FrameIterator.py frames.py function __init__.py printer printing.py prompt.py __pycache__ types.py unwinder.py xmethod.py
我确保使用所有路径启用加载:
$cat ~/.gdbinit
add-auto-load-safe-path /usr/share/gdb/python/gdb/
add-auto-load-safe-path /usr/share/gdb/python/
add-auto-load-safe-path /usr/share/gdb/
set auto-load python-scripts on
但由于某种原因,gdb仍然不喜欢这样:
(gdb) info auto-load
gdb-scripts: No auto-load scripts.
guile-scripts: No auto-load scripts.
libthread-db: No auto-loaded libthread-db.
local-gdbinit: Local .gdbinit file was not found.
python-scripts: No auto-load scripts.
我想在加载gdb后让py-bt命令工作.
py-bt和相关命令通常在GDB