[lldb-dev] Exceptions with lldb
ck at remobjects.com
Tue Oct 30 11:50:00 PDT 2012
Op 18-10-2012 19:11, Carlo Kok schreef:
> I managed to get notified of an objc exception by setting an exception
> breakpoint, but how do I get access to the actual exception information
> (for an NSException, the object maybe? not sure what info is available
> for BAD_ACCESS)?
> the bp itself only seems to have this:
> Stop reason: eStopReasonBreakpoint
> two stop reason data items 0, 1
> no SPValue.
> "breakpoint 1.1" as a reason string.
> Only when an BAD_ACCESS escapes the program I get an exception "break"
> with stop reason eStopReasonException:
> Stop Reason: "EXC_BAD_ACCESS (code=2, address=0x10aa95f0d)"
I case anyone is interested in the answer:
eStopReasonException occurs only for things like BAD_ACCESS, ie
Regular exceptions can be caught by setting an exception breakpoint,
this will trigger in objc_raise. This will have the exception as the
first parameter. (Not quite sure how to get that yet but it IS available).
More information about the lldb-dev