catching exceptions

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

catching exceptions

Andreas Fink-2
Does anyone know how I can catch these exceptions in lldb:

Throwing 0x7f2fa8004588, in flight exception: 0x7f2fa8004588
Exception caught by C++: 0

the usual

break set -S raise

doesnt catch it so it must be some other exception. I just cant find out where it gets thrown because the app already ended.




Reply | Threaded
Open this post in threaded view
|

Re: catching exceptions

David Chisnall-7
On 12/06/2020 12:07, Andreas Fink wrote:
> Does anyone know how I can catch these exceptions in lldb:
>
> Throwing 0x7f2fa8004588, in flight exception: 0x7f2fa8004588
> Exception caught by C++: 0
>
> the usual
>
> break set -S raise

I'm not sure what that does.  I set breakpoints on __cxa_throw and
objc_exception_throw to get the debugger to tell me where exceptions are
thrown.

David


Reply | Threaded
Open this post in threaded view
|

Re: catching exceptions

Andreas Fink-2
thanks thats what I was looking for
break set -S raise catches any call to [NSException raise]

> On 12 Jun 2020, at 13:36, David Chisnall <[hidden email]> wrote:
>
> On 12/06/2020 12:07, Andreas Fink wrote:
>> Does anyone know how I can catch these exceptions in lldb:
>> Throwing 0x7f2fa8004588, in flight exception: 0x7f2fa8004588
>> Exception caught by C++: 0
>> the usual
>> break set -S raise
>
> I'm not sure what that does.  I set breakpoints on __cxa_throw and objc_exception_throw to get the debugger to tell me where exceptions are thrown.
>
> David
>
>