在iPhone4s iOS6.1.3上使用GDB调试,碰到如下问题
GNU gdb 6.3.50-20050815 (Apple version gdb-1708 + reverse.put.as patches v0.4) (Mon Apr 16 00:53:47 UTC 2012)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "arm-apple-darwin".
gdb$ attach 11609
Attaching to process 11609.
Reading symbols for shared libraries . done
bfd_mach_o_scan: unknown architecture 0x0/0xb
bfd_mach_o_scan: unknown architecture 0x100000c/0x0
bfd_mach_o_scan: unknown architecture 0x100000c/0x0
bfd_mach_o_scan: unknown architecture 0x100000c/0x0
bfd_mach_o_scan: unknown architecture 0x100000c/0x0
bfd_mach_o_scan: unknown architecture 0x100000c/0x0
Reading symbols for shared libraries ......................bfd_mach_o_scan_read_symtab_symbol: unable to read 12 bytes at 124984
........................................................................................................................................................... done
bfd_mach_o_scan: unknown architecture 0x0/0xb
bfd_mach_o_scan: unknown architecture 0x100000c/0x0
bfd_mach_o_scan: unknown architecture 0x100000c/0x0
bfd_mach_o_scan: unknown architecture 0x100000c/0x0
bfd_mach_o_scan: unknown architecture 0x100000c/0x0
bfd_mach_o_scan: unknown architecture 0x100000c/0x0
Reading symbols for shared libraries + done
0x3a6b6eb4 in mach_msg_trap ()
Error while running hook_stop:
No symbol table is loaded. Use the "file" command.
虽然attach成功,但是无法识别函数名,只能在内存地址处下断点,而且由于无法识别architecture,调试的时候会按照ARM的4字节命令执行,而APP是Thumb指令,混合2字节和4字节指令的,单步的时候显示的汇编指令就是错误的。
希望各位能给出解决方法,先谢谢了~