我正在尝试在 Simics 预览版 6.0.43 下调试我的自定义内核。
我能够启动内核,在内存地址上设置断点并让执行到达断点。无论如何,我无法加载符号进行符号调试。
这就是我所做的:
simics> $disk0_image="/home/peppe/Scrivania/gpt.img"
simics>
simics> run-command-file /opt/simics/simics-qsp-x86-6.0.43/targets/qsp-x86/qsp-h
dd-boot.simics
simics> enable-debugger
Debugger enabled.
simics>
simics> add-symbol-file /home/peppe/Scrivania/g-os-grub2/g-os/kernel.bin
Context query * currently matches 6 contexts.
Symbol file added with id '1'.
simics> bp.source_location.break 0xc0000812
2: 0x2 (planted)
simics> bp.source_location.break kmain
3: 0x3 (not planted)
simics> list kamin.c
**At col 7: Cannot read symbol data. Invalid abbreviation table offset. Error reading DWARF data**
simics> run
running>
[tcf] Breakpoint 2 on execution in context mb.cpu0.core[0][0]
Now debugging the x86QSP1 board.mb.cpu0.core[0][0]
??()
push ebp
simics> board.mb.cpu0.core[0][0].pregs
rip = 0x00000000c0000812
我编译了我的源代码:
CFLAGS = -O0 -g -c -fno-builtin -m32
gcc version 11.2.1 20211203 (Red Hat 11.2.1-7) (GCC)
我的问题:为什么错误信息
At col 7: Cannot read symbol data. Invalid abbreviation table offset. Error reading DWARF data
这似乎阻止了对符号的正确访问?