| 167 | } |
| 168 | |
| 169 | static _Unwind_Reason_Code unwindOneFrame(_Unwind_State state, |
| 170 | _Unwind_Control_Block* ucbp, |
| 171 | struct _Unwind_Context* context) { |
| 172 | // Read the compact model EHT entry's header # 6.3 |
| 173 | const uint32_t* unwindingData = ucbp->pr_cache.ehtp; |
| 174 | assert((*unwindingData & 0xf0000000) == 0x80000000 && "Must be a compact entry"); |
| 175 | Descriptor::Format format = |
| 176 | static_cast<Descriptor::Format>((*unwindingData & 0x0f000000) >> 24); |
| 177 | |
| 178 | const char *lsda = |
| 179 | reinterpret_cast<const char *>(_Unwind_GetLanguageSpecificData(context)); |
| 180 | |
| 181 | // Handle descriptors before unwinding so they are processed in the context |
| 182 | // of the correct stack frame. |
| 183 | _Unwind_Reason_Code result = |
| 184 | ProcessDescriptors(state, ucbp, context, format, lsda, |
| 185 | ucbp->pr_cache.additional); |
| 186 | |
| 187 | if (result != _URC_CONTINUE_UNWIND) |
| 188 | return result; |
| 189 | |
| 190 | switch (__unw_step(reinterpret_cast<unw_cursor_t *>(context))) { |
| 191 | case UNW_STEP_SUCCESS: |
| 192 | return _URC_CONTINUE_UNWIND; |
| 193 | case UNW_STEP_END: |
| 194 | return _URC_END_OF_STACK; |
| 195 | default: |
| 196 | return _URC_FAILURE; |
| 197 | } |
| 198 | } |
| 199 | |
| 200 | // Generates mask discriminator for _Unwind_VRS_Pop, e.g. for _UVRSC_CORE / |
| 201 | // _UVRSD_UINT32. |
no test coverage detected