Index: src/libcfa/exception.c
===================================================================
--- src/libcfa/exception.c	(revision 38d70abc27abbeee2329235b6c1d6987d8ca1df1)
+++ src/libcfa/exception.c	(revision 8f6dfe7bd6f31ce1ccdbf80675ca4614aa0c6e68)
@@ -10,6 +10,6 @@
 // Created On       : Mon Jun 26 15:13:00 2017
 // Last Modified By : Andrew Beach
-// Last Modified On : Fri Aug  4 15:20:00 2017
-// Update Count     : 6
+// Last Modified On : Thr Aug 17 15:45:00 2017
+// Update Count     : 7
 //
 
@@ -23,4 +23,5 @@
 #include <stdio.h>
 #include <unwind.h>
+#include <libhdr/libdebug.h>
 
 // FIX ME: temporary hack to keep ARM build working
@@ -79,6 +80,5 @@
 void __cfaehm__throw_resume(exception * except) {
 
-	// DEBUG
-	printf("Throwing resumption exception\n");
+	LIB_DEBUG_PRINT_SAFE("Throwing resumption exception\n");
 
 	struct __cfaehm__try_resume_node * original_head = shared_stack.current_resume;
@@ -94,5 +94,5 @@
 	}
 
-	printf("Unhandled exception\n");
+	LIB_DEBUG_PRINT_SAFE("Unhandled exception\n");
 	shared_stack.current_resume = original_head;
 
@@ -106,5 +106,5 @@
 
 void __cfaehm__try_resume_setup(struct __cfaehm__try_resume_node * node,
-                        int (*handler)(exception * except)) {
+                        _Bool (*handler)(exception * except)) {
 	node->next = shared_stack.top_resume;
 	node->handler = handler;
@@ -154,6 +154,5 @@
 	struct exception_context_t * context = this_exception_context();
 
-	// DEBUG
-	printf( "Deleting Exception\n");
+	LIB_DEBUG_PRINT_SAFE("Deleting Exception\n");
 
 	// Remove the exception from the list.
@@ -235,6 +234,5 @@
 
 void __cfaehm__throw_terminate( exception * val ) {
-	// DEBUG
-	printf("Throwing termination exception\n");
+	LIB_DEBUG_PRINT_SAFE("Throwing termination exception\n");
 
 	__cfaehm__allocate_exception( val );
@@ -243,6 +241,5 @@
 
 void __cfaehm__rethrow_terminate(void) {
-	// DEBUG
-	printf("Rethrowing termination exception\n");
+	LIB_DEBUG_PRINT_SAFE("Rethrowing termination exception\n");
 
 	__cfaehm__begin_unwind();
@@ -257,18 +254,15 @@
 {
 
-	// DEBUG
-	//printf("CFA: 0x%lx\n", _Unwind_GetCFA(context));
-	printf("Personality function (%d, %x, %llu, %p, %p):", version, actions, exceptionClass, unwind_exception, context);
+	//LIB_DEBUG_PRINT_SAFE("CFA: 0x%lx\n", _Unwind_GetCFA(context));
+	LIB_DEBUG_PRINT_SAFE("Personality function (%d, %x, %llu, %p, %p):", version, actions, exceptionClass, unwind_exception, context);
 
 	// If we've reached the end of the stack then there is nothing much we can do...
 	if( actions & _UA_END_OF_STACK ) return _URC_END_OF_STACK;
 
-	// DEBUG
 	if (actions & _UA_SEARCH_PHASE) {
-		printf(" lookup phase");
-	}
-	// DEBUG
+		LIB_DEBUG_PRINT_SAFE(" lookup phase");
+	}
 	else if (actions & _UA_CLEANUP_PHASE) {
-		printf(" cleanup phase");
+		LIB_DEBUG_PRINT_SAFE(" cleanup phase");
 	}
 	// Just in case, probably can't actually happen
@@ -306,5 +300,5 @@
 		// Have we reach the correct frame info yet?
 		if( lsd_info.Start + callsite_start + callsite_len < instruction_ptr ) {
-			//DEBUG BEGIN
+#ifdef __CFA_DEBUG_PRINT__
 			void * ls = (void*)lsd_info.Start;
 			void * cs = (void*)callsite_start;
@@ -313,6 +307,6 @@
 			void * ep = (void*)lsd_info.Start + callsite_start + callsite_len;
 			void * ip = (void*)instruction_ptr;
-			printf("\nfound %p - %p (%p, %p, %p), looking for %p\n", bp, ep, ls, cs, cl, ip);
-			//DEBUG END
+			LIB_DEBUG_PRINT_SAFE("\nfound %p - %p (%p, %p, %p), looking for %p\n", bp, ep, ls, cs, cl, ip);
+#endif // __CFA_DEBUG_PRINT__
 			continue;
 		}
@@ -362,11 +356,14 @@
 
 					// Based on the return value, check if we matched the exception
-					if( ret == _URC_HANDLER_FOUND) printf(" handler found\n");
-					else printf(" no handler\n");
+					if( ret == _URC_HANDLER_FOUND) {
+						LIB_DEBUG_PRINT_SAFE(" handler found\n");
+					} else {
+						LIB_DEBUG_PRINT_SAFE(" no handler\n");
+					}
 					return ret;
 				}
 
 				// This is only a cleanup handler, ignore it
-				printf(" no action");
+				LIB_DEBUG_PRINT_SAFE(" no action");
 			}
 			else if (actions & _UA_CLEANUP_PHASE) {
@@ -388,6 +385,5 @@
 				_Unwind_SetIP( context, ((lsd_info.LPStart) + (callsite_landing_pad)) );
 
-				// DEBUG
-				printf(" action\n");
+				LIB_DEBUG_PRINT_SAFE(" action\n");
 
 				// Return have some action to run
@@ -397,12 +393,11 @@
 
 		// Nothing to do, move along
-		printf(" no landing pad");
+		LIB_DEBUG_PRINT_SAFE(" no landing pad");
 	}
 	// No handling found
-	printf(" table end reached\n");
-
-	// DEBUG
+	LIB_DEBUG_PRINT_SAFE(" table end reached\n");
+
 	UNWIND:
-	printf(" unwind\n");
+	LIB_DEBUG_PRINT_SAFE(" unwind\n");
 
 	// Keep unwinding the stack
Index: src/libcfa/exception.h
===================================================================
--- src/libcfa/exception.h	(revision 38d70abc27abbeee2329235b6c1d6987d8ca1df1)
+++ src/libcfa/exception.h	(revision 8f6dfe7bd6f31ce1ccdbf80675ca4614aa0c6e68)
@@ -10,6 +10,6 @@
 // Created On       : Mon Jun 26 15:11:00 2017
 // Last Modified By : Andrew Beach
-// Last Modified On : Fri Aug  4 15:20:00 2017
-// Update Count     : 5
+// Last Modified On : Thr Aug 17 15:44:00 2017
+// Update Count     : 6
 //
 
@@ -55,5 +55,5 @@
 struct __cfaehm__try_resume_node {
     struct __cfaehm__try_resume_node * next;
-    int (*handler)(exception * except);
+    _Bool (*handler)(exception * except);
 };
 
@@ -61,5 +61,5 @@
 void __cfaehm__try_resume_setup(
     struct __cfaehm__try_resume_node * node,
-    int (*handler)(exception * except));
+    _Bool (*handler)(exception * except));
 void __cfaehm__try_resume_cleanup(
     struct __cfaehm__try_resume_node * node);
