I'm trying to build my own signal and uncaught exception handler for iOS. To do this i use these two functions :
NSSetUncaughtExceptionHandler(/*handler*/);
and
signal(/*signal const*/, /*signal handler*/);
My problem is that i can't make it work with EXC_BAD_ACCESS signal. Is there some signal constant (like SIGABRT, SIGBUS) to catch the EXC_BAD_ACCESS? If no, how can i handle it? Some crash analytics tools (lika PLCrashReporter, Crashlytics etc.) can trace it...
EXC_BAD_ACCESS
doesn't generate an exception so you first function doesn't work with the case. It generates a signalSIGSEGV
orSIGBUS
.Please refer to Handling unhandled exceptions and signals by Cocoa with Love.
Update
I just checked the source code of LLDB. It might be
TARGET_EXC_BAD_ACCESS
= 0x91.In RNBRemote.h:
and in RNBRemote.cpp: