LLDB print out NSException name or class from library

0

In Xcode I use "All Objective-C exception" breakpoint, but i want to skip some specific NSException. I found in this article all the information about how to skip some specific NSException's name and it works perfectly for all the @try{} @catch I've put in my code.

Unfortunately I'm forced to use a library that does a massive use of @try @catch as a way to communicate between object, and when applications stops at the breakpoint I'm not able to know the exact NSException name.

This is the point where the code stops:

eax = 0x0d3c73f0
ebx = 0x00a675a8  @"databaseName"
ecx = 0x00b61d01  
edx = 0x00b61d01  
edi = 0x00a655a8  @"MessagingClientLib: initInstance must be called prior to getInstanceRuntimeException: Application ID is required"
esi = 0x000039d1  iDCP`-[UIView(FrameMucking) setOrigin:] + 65 at UIView+FrameMocking.h:103
ebp = 0xbfffc928
esp = 0xbfffc91c
ss = 0x00000023
eflags = 0x00000286
eip = 0x03a738b9  libobjc.A.dylib`objc_exception_throw
cs = 0x0000001b
ds = 0x00000023
es = 0x00000023
fs = 0x00000000
gs = 0x0000000f

Any advice?

ios
xcode
debugging
lldb
asked on Stack Overflow May 29, 2014 by IgnazioC • edited May 29, 2014 by Rob

1 Answer

1

Select the stack frame for objc_exception_throw and then enter this command:

(lldb) po *(id *)($esp + 4) // reason
(lldb) po *(id *)($esp + 12) // name
answered on Stack Overflow May 29, 2014 by Ken Kuan

User contributions licensed under CC BY-SA 3.0