【发布时间】:2020-06-23 20:36:20
【问题描述】:
我是 C 语言的新手,我的任务是修改 GRUB。怎样的学习方法,对吧?无论如何,我正在尝试使用 VMWare 和 GDB 调试我修改后的 GRUB。我以前可以让调试器工作,但由于某种原因,每次我加载我的虚拟机并连接 GDB 时,在 GRUB 的加载过程中,我得到:
.loadsym.gdb:1: Error in sourced command file:
The address where biosdisk.module has been loaded is missing
我不知道该怎么办。我的第一个想法是,“哦,我只要add-symbol-file <file> 就可以解决它!”但显然这告诉 GDB 忘记它加载的所有其他符号????所以我无法添加符号文件并设置断点。
我的谷歌搜索只返回一个semi-relevant post,它并没有真正深入解决问题。
这个输出也可能是相关的。
info file biosdisk.module
Symbols from "H:\Workspace\GRUB\Bootloader\Trunk\grub-core\kernel.exec".
Remote serial target in gdb-specific protocol:
Debugging a target over a serial line.
While running this, GDB does not access memory from...
Local exec file:
`H:\Workspace\GRUB\Bootloader\Trunk\grub-core\kernel.exec', file type elf32-i386.
Entry point: 0x9000
0x00009000 - 0x0000e6e0 is .text
0x0000e6e0 - 0x0000f68d is .rodata
0x0000f6a0 - 0x0000fe74 is .data
0x0000fe80 - 0x000175d4 is .bss
【问题讨论】: