如何在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命令指南,但没有找到任何有用的东西(有点让人困惑,你不知道你在找什么)。
我怎样才能打印崩溃的原因?
我正在运行iOS 8,lldb和Xcode 6。
编辑
  现在我明白为什么没有找到这些寄存器。  这是我在运行register read时得到的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
正如你所看到的,这些寄存器不包含我之前尝试过的寄存器。 但是,我仍然无法找到例外。

你应该输入:
 po $arg1 
有关更多信息,请参阅:如何用Breakpoint导航器中的定义替换NSUncaughtExceptionHandler?
强调里克斯特从以前的回答中发表的评论:
确保您选择了正确的框架。
  在调试导航器中选择最上面的“机器代码”框后, po $arg1为我工作。 
上一篇: How to print exception on exception breakpoint in Xcode 6?
下一篇: Can I use Apple Pay to create a Stripe Token without charging the user?
