【发布时间】:2021-09-21 00:13:29
【问题描述】:
我正在尝试将 gdb 与一个简单的 hello world 程序一起使用,但遇到了一些问题
hello.c
#include <stdio.h>
int main()
{
printf("Hello World");
return 0;
}
然后我使用以下两个命令进行编译:
gcc -o hello.o hello.c
gcc -g -o hello.o hello.c
但是当我输入 gdb hello.c 时,我得到一个错误:
"/home/myName/hello.c": not in executable format: file format not recognized
有人知道为什么会这样吗?
【问题讨论】: