我试图在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这似乎妨碍了正确访问符号?
发布于 2022-03-21 10:35:30
Simics应该支持Dwarf 5,但是您需要升级到至少6.0.116,而6.0.126是在3月9日发布的。
https://stackoverflow.com/questions/70854614
复制相似问题