【发布时间】:2019-03-11 14:28:33
【问题描述】:
我已经使用 VMware Workstation 设置了 Linux Kernel 调试环境。但是当我尝试连接正确连接的 gdb 但我无法设置任何断点或检查任何内核符号时。
目标机(被调试者)Ubuntu 18: 我已经使用以下指令编译了 linux 内核 5.0-0:
CONFIG_DEBUG_INFO=y
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
CONFIG_DEBUG_INFO_DWARF4=y
CONFIG_DEBUG_FS=y
# CONFIG_DEBUG_SECTION_MISMATCH is not set
# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
还有我的 VMX 文件配置:
debugStub.listen.guest64 = "TRUE"
debugStub.listen.guest64.remote="TRUE"
之后,我将 vmlinux 转移到调试器机器并使用 gdb:
bash$ gdb vmlinux
gdb-peda$ target remote 10.251.31.28:8864
Remote debugging using 10.251.31.28:8864
Warning: not running or target is remote
0xffffffff9c623f36 in ?? ()
gdb-peda$ disas sys_open
No symbol "do_sys_open" in current context.
【问题讨论】:
标签: linux linux-kernel gdb