0xc*_*dd3 2 python gdb kernel linux-kernel
我一直在按照本指南使用 gdb 和 VMWare 设置 Linux 内核调试环境。一切都进行得很顺利,直到那部分:
将 GDB 连接到调试对象
我们还不能看到来自加载的内核模块的符号。我们将加载帮助程序脚本,然后运行 lx-symbols,它将探测加载的模块并适当地配置 GDB:
(gdb) source home/alambert/kernel/source/linux-4.13.0/debian/build/build-generic/vmlinux-gdb.py
(gdb) lx-symbols
在我的系统上运行它时,我收到以下 python 错误:
pwndbg> source /home/user/kernel/source/linux-4.4.0/debian/build/build-generic/vmlinux-gdb.py
pwndbg> lx-symbols
loading vmlinux
Python Exception <class 'gdb.error'> There is no member named module_core.:
Error occurred in Python command: There is no member named module_core.
无论是调试器和被调试机器的虚拟机,被调试是Ubuntu的16.04和调试器是一个Ubuntu的18.04。
被调试者:
$ cat /proc/version
Linux version 4.4.0-134-generic (buildd@lgw01-amd64-033) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10) ) #160-Ubuntu SMP Wed Aug 15 14:58:00 UTC 2018
调试器:
$ cat /proc/version
Linux version 4.15.0-34-generic (buildd@lgw01-amd64-047) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #37-Ubuntu SMP Mon Aug 27 15:21:48 UTC 2018
$ gdb --version
GNU gdb (GDB) 8.2
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ python -V
Python 2.7.15rc1
我首先认为这是一个 python3/2 兼容性问题,所以我用 python 2.7 重新编译了 gdb,但得到了完全相同的错误。
我还验证了这不是pwndbg问题 - 我用 vanilla gdb 尝试了完全相同的效果。
我已经验证了在编译调试内核的过程中已经创建了 python 帮助程序脚本。我实际上让整个构建过程完成,而不是像指南建议的那样在创建脚本后停止它 - 只是为了确保它们都到位。
我曾尝试在线查找错误,但似乎没有任何提及。
有没有人遇到过这个问题?
| 归档时间: |
|
| 查看次数: |
1867 次 |
| 最近记录: |