Changes in libcfa/src/exception.c [13600e8:8108ba8]
- File:
-
- 1 edited
-
libcfa/src/exception.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/exception.c
r13600e8 r8108ba8 9 9 // Author : Andrew Beach 10 10 // Created On : Mon Jun 26 15:13:00 2017 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Thu Aug 10 16:45:22 202313 // Update Count : 6911 // Last Modified By : Andrew Beach 12 // Last Modified On : Wed Feb 24 13:40:00 2021 13 // Update Count : 36 14 14 // 15 15 … … 27 27 #include "stdhdr/assert.h" 28 28 #include "virtual.h" 29 30 extern void __cabi_abort( const char fmt[], ... );31 29 32 30 #pragma GCC visibility push(default) … … 125 123 126 124 // Creates a copy of the indicated exception and sets current_exception to it. 127 void __cfaehm_allocate_exception( exception_t * except ) {125 static void __cfaehm_allocate_exception( exception_t * except ) { 128 126 struct exception_context_t * context = this_exception_context(); 129 127 … … 194 192 195 193 if ( actions & _UA_END_OF_STACK ) { 196 __cabi_abort( 197 "Propagation failed to find a matching handler.\n" 198 "Possible cause is a missing try block with appropriate catch clause for specified exception type.\n" 199 "Last exception name or message: %s.\n", 200 NODE_TO_EXCEPT( UNWIND_TO_NODE( unwind_exception ) )-> 201 virtual_table->msg( NODE_TO_EXCEPT( UNWIND_TO_NODE( unwind_exception ) ) ) 202 ); 194 abort(); 203 195 } else { 204 196 return _URC_NO_REASON; … … 217 209 struct exception_context_t * context = this_exception_context(); 218 210 struct __cfaehm_node * node = EXCEPT_TO_NODE(context->current_exception); 211 212 // Preform clean-up of any extra active exceptions. 213 while ( node->next ) { 214 struct __cfaehm_node * to_free = node->next; 215 node->next = to_free->next; 216 exception_t * except = NODE_TO_EXCEPT( to_free ); 217 except->virtual_table->free( except ); 218 free( to_free ); 219 } 219 220 220 221 _Unwind_Reason_Code ret; … … 238 239 239 240 // The exception that is being thrown must already be stored. 240 void __cfaehm_begin_unwind(void(*defaultHandler)(exception_t *)) {241 static void __cfaehm_begin_unwind(void(*defaultHandler)(exception_t *)) { 241 242 struct exception_context_t * context = this_exception_context(); 242 243 if ( NULL == context->current_exception ) { … … 567 568 " .hidden CFA.ref.__gcfa_personality_v0\n" 568 569 " .weak CFA.ref.__gcfa_personality_v0\n" 570 // No clue what this does specifically 571 " .section .data.rel.local.CFA.ref.__gcfa_personality_v0,\"awG\",@progbits,CFA.ref.__gcfa_personality_v0,comdat\n" 569 572 #if defined( __x86_64 ) || defined( __i386 ) 570 573 " .align 8\n"
Note:
See TracChangeset
for help on using the changeset viewer.