Changes in libcfa/src/exception.c [142930b:c40157e]
- File:
-
- 1 edited
-
libcfa/src/exception.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/exception.c
r142930b rc40157e 55 55 } 56 56 57 struct __cfaehm_base_exception_t * __cfaehm_get_current_exception(void) { 58 return this_exception_context()->current_exception; 59 } 57 60 58 61 // RESUMPTION ================================================================ … … 309 312 struct _Unwind_Context * unwind_context) 310 313 { 311 // ! __cfadbg_print_safe(exception, "CFA: 0x%lx\n", _Unwind_GetCFA(unwind_context));314 //__cfadbg_print_safe(exception, "CFA: 0x%lx\n", _Unwind_GetCFA(context)); 312 315 __cfadbg_print_safe(exception, "Personality function (%d, %x, %llu, %p, %p):", 313 316 version, actions, exception_class, unwind_exception, unwind_context); … … 479 482 // and simply linked from libcfa but there is one problem left, see the exception table for details 480 483 __attribute__((noinline)) 481 void__cfaehm_try_terminate(void (*try_block)(),482 void (*catch_block)(int index, exception_t * except),484 int __cfaehm_try_terminate(void (*try_block)(), 485 __attribute__((unused)) void (*catch_block)(int index, exception_t * except), 483 486 __attribute__((unused)) int (*match_block)(exception_t * except)) { 484 487 //! volatile int xy = 0; 485 //! printf("%p %p %p %p\n", &try_block, &catch_block, &match_block, &xy);488 //! printf("%p %p %p\n", &try_block, &match_block, &xy); 486 489 487 490 // Setup the personality routine and exception table. … … 507 510 508 511 // Normal return for when there is no throw. 509 return ;512 return 0; 510 513 511 514 // Exceptionnal path … … 518 521 asm volatile (".CATCH:"); 519 522 520 // Exception handler 521 // Note: Saving the exception context on the stack breaks termination exceptions. 522 catch_block( EXCEPT_TO_NODE( this_exception_context()->current_exception )->handler_index, 523 this_exception_context()->current_exception ); 523 return EXCEPT_TO_NODE( this_exception_context()->current_exception )->handler_index; 524 524 } 525 525
Note:
See TracChangeset
for help on using the changeset viewer.