我的应用程序崩溃了,它好像被捕获到异常断点(这是有道理的),但我无法找到崩溃的原因。如何在Xcode 6的异常断点处打印异常?
这是我已经试过:
po $eax
po $rax
po $r0
po *(id *)($esp + 4)
对于所有试图在上面,我发现了以下错误:
error: use of undeclared identifier '$<register name>' error: 1 errors parsing expression
我也发现了这个LLDB Command Guide,但没有发现任何有用的东西(有点混乱它,你不知道你在找什么)。
如何打印碰撞原因?
我运行iOS 8,LLDB和Xcode的6
编辑
现在我明白为什么都没有发现这些寄存器。下面是我得到的,当我运行register read
:
General Purpose Registers:
x0 = 0x0000000000000001
x1 = 0x0000000000000000
x2 = 0x0000000000000000
x3 = 0x0000000195531a74 libsystem_malloc.dylib`nano_free_definite_size
x4 = 0x0000000000000000
x5 = 0x0000000000000000
x6 = 0x676e697274534643
x7 = 0x0000000000000f80
x8 = 0x00000001569d5a10
x9 = 0x0000000000000000
x10 = 0x000001a574056051
x11 = 0x0000000000000001
x12 = 0x000000000000003d
x13 = 0x0000000000000000
x14 = 0x0000000000000001
x15 = 0x0000000000000052
x16 = 0x0000000194d6e510 libobjc.A.dylib`object_setClass
x17 = 0x0000000000000000
x18 = 0x0000000000000000
x19 = 0x00000001702823f0
x20 = 0x0000000174038eaa
x21 = 0x000000019130a778 "release"
x22 = 0x0000000000000000
x23 = 0x0000000174246d20
x24 = 0x0000000174038ea0
x25 = 0x00000001895d22fa "forwardingTargetForSelector:"
x26 = 0x00000001745186a0
x27 = 0x0000000000000000
x28 = 0x00000000a40008ff
fp = 0x0000000105757720
lr = 0x000000018462a440 CoreFoundation`___forwarding___ + 968
sp = 0x00000001057576c0
pc = 0x000000018462a440 CoreFoundation`___forwarding___ + 968
cpsr = 0x20000000
正如你可以看到这些都是使用不含有任何我以前试过的那些的寄存器。但是,我仍然无法找到例外。
[Xcode/GDB:如何获得刚才抛出的异常信息?](http://stackoverflow.com/questions/3327828/xcode-gdb-how-to-get-information-about -an-exception-that-just-thrown) – 2015-06-12 18:38:28