os x 10.9上的gdb无法找到目标文件

时间:2014-02-05 02:11:58

标签: gdb osx-mavericks

我写了一个很小的测试文件:

#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".
...

有什么想法解决它?

0 个答案:

没有答案