When implementing my own exception handling code in a Cocoa application using Mach-O low level calls to set my own excpetion handling thread, my catch_exception_raise
is never called…
But when I use ligsigsegv as a library, it works !?
Any idea why ?
If the exc_server doesn't find your routine it is most probably because of linker related behaviour…
Be sure to turn on the "Preserve private externals" linker flag in the Linking settings tab of your Xcode project… or pass -keep_private_externs
to the linker…
And of course, in case of C++ and Objective-C++, the function must be declared extern "C"
…
http://www.macosxguru.net//article.php?story=2006062907424319