Macos OSX 10.9(64位)上的Gdb在我运行程序时抛出了一堆文本

Macos OSX 10.9(64位)上的Gdb在我运行程序时抛出了一堆文本,macos,debugging,gdb,breakpoints,main,Macos,Debugging,Gdb,Breakpoints,Main,以下是整个命令序列和文本墙: gdb -q ./a.out Reading symbols for shared libraries .. done (gdb) disassemble main Dump of assembler code for function main: 0x0000000100000f20 <main+0>: push %rbp 0x0000000100000f21 <main+1>: mov %rsp,%rbp 0x000

以下是整个命令序列和文本墙:

gdb -q ./a.out
Reading symbols for shared libraries .. done
(gdb) disassemble main
Dump of assembler code for function main:
0x0000000100000f20 <main+0>:    push   %rbp
0x0000000100000f21 <main+1>:    mov    %rsp,%rbp
0x0000000100000f24 <main+4>:    sub    $0x10,%rsp
0x0000000100000f28 <main+8>:    movl   $0x0,-0x4(%rbp)
0x0000000100000f2f <main+15>:   movl   $0x0,-0x8(%rbp)
0x0000000100000f36 <main+22>:   cmpl   $0xa,-0x8(%rbp)
0x0000000100000f3d <main+29>:   jge    0x100000f64 <main+68>
0x0000000100000f43 <main+35>:   lea    0x44(%rip),%rdi        # 0x100000f8e
0x0000000100000f4a <main+42>:   mov    $0x0,%al
0x0000000100000f4c <main+44>:   callq  0x100000f6e <dyld_stub_printf>
0x0000000100000f51 <main+49>:   mov    %eax,-0xc(%rbp)
0x0000000100000f54 <main+52>:   mov    -0x8(%rbp),%eax
0x0000000100000f57 <main+55>:   add    $0x1,%eax
0x0000000100000f5c <main+60>:   mov    %eax,-0x8(%rbp)
0x0000000100000f5f <main+63>:   jmpq   0x100000f36 <main+22>
0x0000000100000f64 <main+68>:   mov    -0x4(%rbp),%eax
0x0000000100000f67 <main+71>:   add    $0x10,%rsp
0x0000000100000f6b <main+75>:   pop    %rbp
0x0000000100000f6c <main+76>:   retq   
End of assembler dump.
(gdb) break main
Breakpoint 1 at 0x100000f2f: file firstprog.c, line 5.
(gdb) run
Starting program: /Users/sankarshanmudkavi/Desktop/test/test/a.out 
Reading symbols for shared libraries +..............bfd_mach_o_scan_read_symtab_symbol: symbol "_bzero" is unsupported 'indirect' reference: setting to undefined
bfd_mach_o_scan_read_symtab_symbol: symbol "_memccpy" is unsupported 'indirect' reference: setting to undefined
bfd_mach_o_scan_read_symtab_symbol: symbol "_memchr" is unsupported 'indirect' reference: setting to undefined
bfd_mach_o_scan_read_symtab_symbol: symbol "_memcmp" is unsupported 'indirect' reference: setting to undefined
bfd_mach_o_scan_read_symtab_symbol: symbol "_memcpy" is unsupported 'indirect' reference: setting to undefined
bfd_mach_o_scan_read_symtab_symbol: symbol "_memmove" is unsupported 'indirect' reference: setting to undefined
bfd_mach_o_scan_read_symtab_symbol: symbol "_memset" is unsupported 'indirect' reference: setting to undefined
bfd_mach_o_scan_read_symtab_symbol: symbol "_strchr" is unsupported 'indirect' reference: setting to undefined
bfd_mach_o_scan_read_symtab_symbol: symbol "_strcmp" is unsupported 'indirect' reference: setting to undefined
bfd_mach_o_scan_read_symtab_symbol: symbol "_strncmp" is unsupported 'indirect' reference: setting to undefined
....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".
gdb-q./a.out
正在读取共享库的符号。。完成
(gdb)拆卸主管道
主功能的汇编程序代码转储:
0x0000000100000f20:推送%rbp
0x0000000100000f21:mov%rsp,%rbp
0x0000000100000f24:子$0x10,%rsp
0x0000000100000f28:movl$0x0,-0x4(%rbp)
0x0000000100000f2f:movl$0x0,-0x8(%rbp)
0x0000000100000f36:cmpl$0xa,-0x8(%rbp)
0x0000000100000f3d:jge 0x100000f64
0x0000000100000f43:lea 0x44(%rip),%rdi#0x100000f8e
0x0000000100000f4a:mov$0x0,%al
0x0000000100000f4c:callq 0x100000f6e
0x0000000100000f51:mov%eax,-0xc(%rbp)
0x0000000100000f54:mov-0x8(%rbp),%eax
0x0000000100000f57:添加$0x1,%eax
0x0000000100000f5c:mov%eax,-0x8(%rbp)
0x0000000100000f5f:jmpq 0x100000f36
0x0000000100000f64:mov-0x4(%rbp),%eax
0x0000000100000f67:添加$0x10,%rsp
0x0000000100000f6b:弹出%rbp
0x0000000100000f6c:retq
汇编程序转储结束。
(gdb)主断路器
断点1位于0x10000F2F:文件firstprog.c,第5行。
(gdb)运行
启动程序:/Users/sankarshanmudkavi/Desktop/test/test/a.out
读取共享库的符号+………..bfd\u mach\u o\u scan\u read\u symtab\u符号:符号“\u bzero”不支持“间接”参考:设置为未定义
bfd_马赫数_o_扫描_读取_符号选项卡_符号:符号“_memccpy”不支持“间接”参考:设置为未定义
bfd_马赫数_o_扫描_读取_符号选项卡_符号:符号“_memchr”不支持“间接”参考:设置为未定义
bfd_马赫数_o_扫描_读取_符号选项卡_符号:符号“_memcmp”不支持“间接”参考:设置为未定义
bfd_马赫数_o_扫描_读取_符号选项卡_符号:符号“_memcpy”不支持“间接”参考:设置为未定义
bfd_马赫数_o_扫描_读取_符号选项卡_符号:符号“_memmove”不支持“间接”参考:设置为未定义
bfd_马赫数_o_扫描_读取_符号选项卡_符号:符号“_memset”不支持“间接”参考:设置为未定义
bfd_马赫数_o_扫描_读取_符号选项卡_符号:符号“_strchr”不支持“间接”参考:设置为未定义
bfd_马赫数_o_扫描_读取_符号选项卡_符号:符号“_strcmp”不支持“间接”参考:设置为未定义
bfd_马赫数_o_扫描_读取_符号选项卡_符号:符号“_strncmp”不支持“间接”参考:设置为未定义
..警告:找不到对象文件“/private/var/tmp/Libsyscall/Libsyscall-2422.1.72~6/Libsyscall.build/Libsyscall\u dynamic.build/Objects normal/x86\u 64/\u libc\u funcptr.o”-没有可用于“\u libc\u funcptr.c”的调试信息。
警告:找不到对象文件“/private/var/tmp/Libsyscall/Libsyscall-2422.1.72~6/Libsyscall.build/Libsyscall\u dynamic.build/Objects normal/x86\u 64/strlen.o”-没有可用于“strlen.c”的调试信息。
还有更多类似的警告。到底发生了什么?
谷歌搜索什么也没给我,但我怀疑这与我的mac电脑的架构有关。(2012 rMBP)。

可能与xCode不再支持的原因有关gdb@PaulBeusterien你能提供一个链接吗?我的侧底也有同样的问题