python - 在 Linux 上运行 GDB
问题描述
我正在尝试使用 linux 内核运行 gdb。我使用 CONFIG_GDB_SCRIPTS=y 构建了 linux,并尝试在“../linux/scripts/gdb”中的 gdb 中运行 python 脚本“vmlinux-gdb.py”。但结果我得到了错误
File "../linux/scripts/gdb/linux/proc.py", line 15, in <module>
from linux import constants
ImportError: cannot import name constants
目录“../linux/scripts/gdb/linux”中有几个文件:
clk.py device.py lists.py proc.pyc tasks.pyc
config.py dmesg.py lists.pyc rbtree.py timerlist.py
config.pyc dmesg.pyc Makefile rbtree.pyc utils.py
constants.py.in genpd.py modules.py symbols.py utils.pyc
cpus.py __init__.py modules.pyc symbols.pyc
cpus.pyc __init__.pyc proc.py tasks.py
所以,这个目录没有文件 constants.py。
我的问题是如何从 constants.py.in 构建 constants.py?
解决方案
推荐阅读
- python - 在 python 中实现服务提供者接口模式
- java - 画布上的图像地图在加载时显示标记将地理纬度转换为 xy 像素坐标
- django - 我怎样才能得到这个值?DJANGO
- c++ - 我的 C++ 错误中出现编译错误:需要一个标识符
- c# - C# Razor 编辑表单中的日期显示为:“dd / MM / aaaa”
- javascript - 点击时 React-Scroll 略高于
- godot - GDScript 中的堆栈溢出
- python-3.x - matplotlib:子图(或网格规范)中的 FigureClass 实例?
- html - 表格布局仅针对一列固定?
- python - 使用 Daphne 在 DEBUG 模式下运行 Django