我写了一个很小的测试文件:
#include <stdio.h>
int main() {
printf("hello world\n");
printf("hello world\n");
return 0;
}
并尝试通过
编译程序gcc -O0 -g3 -Wall -c -fmessage-length=0
但是后来gdb产生了类似这样的警告墙
bfd_mach_o_scan_read_symtab_symbol: symbol bfd_mach_o_scan_read_symtab_symbol: symbol bfd_mach_o_scan_read_symtab_symbol: symbol bfd_mach_o_scan_read_symtab_symbol: symbol bfd_mach_o_scan_read_symtab_symbol: symbol bfd_mach_o_scan_read_symtab_symbol: symbol bfd_mach_o_scan_read_symtab_symbol: symbol bfd_mach_o_scan_read_symtab_symbol: symbol warning: Could not find object file "/private/var/tmp/Libsyscall/Libsyscall-2422.1.72~6/Libsyscall.build/Libsyscall_dynamic.build/Objects-normal/x86_64/_libc_funcptr.o" - no debug information available for "_libc_funcptr.c".
warning: Could not find object file "/private/var/tmp/Libsyscall/Libsyscall-2422.1.72~6/Libsyscall.build/Libsyscall_dynamic.build/Objects-normal/x86_64/strlen.o" - no debug information available for "strlen.c".
warning: Could not find object file "/private/var/tmp/Libsyscall/Libsyscall-2422.1.72~6/Libsyscall.build/Libsyscall_dynamic.build/Objects-normal/x86_64/strcmp.o" - no debug information available for "strcmp.c".
...
有什么想法解决它?