I think I do not have karma to add a comment to Nimrod Ghat, so I must provide my observation here. I will try to make it worthy of a separate answer.
It is very, very difficult to write a reliable, correct and reliable fault reporter, especially one that works directly in the process. The code mentioned in Nimrod Ghat's answer is incorrect and honest that the blog post should be canceled. Signal handlers should only run asynchronous code, and this code is not safe for asynchronous use:
http://www.cocoadev.com/index.pl?SignalSafety
Error handling is even more complicated than normal signal processing because you cannot expect the process to continue to run successfully after your signal handler returns.
It's tempting to think that you can just hack a simpler solution and it will work for a while, but there is a good reason why people like Google engineers have thousands of LoCs designed to reliably report crashes:
http://code.google.com/p/google-breakpad/
On iOS, you should just use PLCrashReporter. On other platforms (e.g. Mac OS X) you should use the Google Breakpad. It makes no sense to reinvent this wheel if you do not only do it right, but better than what already exists.
source share