我正在使用 gdb [7.11.1] kali linux 32 位 当我使用 list 命令在 gdb 中加载我的汇编程序的源代码时,它显示以下错误消息: '没有加载符号表。使用"file"命令'
我试过如下命令:
列表 列出行号
在这两种情况下,错误是相同的。
请帮帮我
谢谢!提前
最佳答案
I use list command to lload the source of my assembly
List 命令什么都不做。相反,它列出了 GDB 已经加载的源。
as -o progname.o progname.s
在您的情况下,GDB 不会加载任何源代码,因为您在没有任何调试信息的情况下编译了程序。您可能想要:
as -g -o progname.o progname.s
来自 man as :
-g
--gen-debug
Generate debugging information for each assembler source line
using whichever debug format is preferred by the target. This
currently means either STABS, ECOFF or DWARF2.
关于linux - 列表命令未在 gdb 中加载汇编程序的源代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42043032/