【发布时间】:2020-09-17 00:30:36
【问题描述】:
您好,我只有以下文件:
示例_:ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, for GNU/Linux 2.2.5, not stripped
当我运行它时,它会出现分段错误。我尝试用gdb调试,结果是:Reading symbols from sample_...(no debugging symbols found)...done.
然后我尝试使用file 命令:
(gdb) file sample_
Reading symbols from sample_...(no debugging symbols found)...done.
我没有 .c 文件本身。
如何调试它?
【问题讨论】:
-
打开
-g标志编译。 -
我无法编译,我只有一个文件本身,没有其他 .c 文件
-
然后它没有在
-g标志上编译,没什么可做的:( -
还有其他方法吗?我可以转储它,但是汇编代码很多,很难理解
-
如果你没有它的源代码,你只能检查汇编代码。如果没有调试符号,可能会变得非常难以阅读