- File:
-
- 1 edited
-
doc/working/exception/impl/except.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
doc/working/exception/impl/except.c
r6b72040 r4a58895 4 4 5 5 #include "lsda.h" 6 7 // This macro should be the only thing that needs to change across machines.8 // struct _Unwind_Context * -> _Unwind_Reason_Code(*)()9 #define MATCHER_FROM_CONTEXT(ptr_to_context) \10 (*(_Unwind_Reason_Code(**)())(_Unwind_GetCFA(ptr_to_context) + 8))11 12 6 13 7 //Global which defines the current exception … … 23 17 struct _Unwind_Exception* unwind_exception, struct _Unwind_Context* context) 24 18 { 25 printf("CFA: 0x%lx\n", _Unwind_GetCFA(context));26 27 19 //DEBUG 28 20 printf("Personality function (%d, %x, %llu, %p, %p):", version, actions, exceptionClass, unwind_exception, context); … … 119 111 120 112 //Get a function pointer from the relative offset and call it 121 // _Unwind_Reason_Code (*matcher)() = (_Unwind_Reason_Code (*)())lsd_info.LPStart + imatcher; 122 123 _Unwind_Reason_Code (*matcher)() = 124 MATCHER_FROM_CONTEXT(context); 113 _Unwind_Reason_Code (*matcher)() = (_Unwind_Reason_Code (*)())lsd_info.LPStart + imatcher; 125 114 _Unwind_Reason_Code ret = matcher(); 126 115
Note:
See TracChangeset
for help on using the changeset viewer.