| 38 | }; |
| 39 | |
| 40 | static cxa_exception_begin_gcc* exception_begin_gcc_ptr(void* ptr) { |
| 41 | size_t kExceptionBeginOffset = ( |
| 42 | sizeof(void*) == 8 ? 128 : 96 |
| 43 | ); |
| 44 | return (cxa_exception_begin_gcc*)((char*)ptr - kExceptionBeginOffset); |
| 45 | } |
| 46 | |
| 47 | static void* get_current_exception_raw_ptr(void* exc_ptr) { |
| 48 | // https://github.com/gcc-mirror/gcc/blob/16e2427f50c208dfe07d07f18009969502c25dc8/libstdc%2B%2B-v3/libsupc%2B%2B/eh_ptr.cc#L147 |