MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / step

Method step

system/lib/libunwind/src/UnwindCursor.hpp:3146–3187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3144#endif // defined(_LIBUNWIND_CHECK_HAIKU_SIGRETURN)
3145
3146template <typename A, typename R> int UnwindCursor<A, R>::step(bool stage2) {
3147 (void)stage2;
3148 // Bottom of stack is defined is when unwind info cannot be found.
3149 if (_unwindInfoMissing)
3150 return UNW_STEP_END;
3151
3152 // Use unwinding info to modify register set as if function returned.
3153 int result;
3154#if defined(_LIBUNWIND_CHECK_LINUX_SIGRETURN) || \
3155 defined(_LIBUNWIND_CHECK_HAIKU_SIGRETURN)
3156 if (_isSigReturn) {
3157 result = this->stepThroughSigReturn();
3158 } else
3159#endif
3160 {
3161#if defined(_LIBUNWIND_SUPPORT_COMPACT_UNWIND)
3162 result = this->stepWithCompactEncoding(stage2);
3163#elif defined(_LIBUNWIND_SUPPORT_SEH_UNWIND)
3164 result = this->stepWithSEHData();
3165#elif defined(_LIBUNWIND_SUPPORT_TBTAB_UNWIND)
3166 result = this->stepWithTBTableData();
3167#elif defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND)
3168 result = this->stepWithDwarfFDE(stage2);
3169#elif defined(_LIBUNWIND_ARM_EHABI)
3170 result = this->stepWithEHABI();
3171#else
3172 #error Need _LIBUNWIND_SUPPORT_COMPACT_UNWIND or \
3173 _LIBUNWIND_SUPPORT_SEH_UNWIND or \
3174 _LIBUNWIND_SUPPORT_DWARF_UNWIND or \
3175 _LIBUNWIND_ARM_EHABI
3176#endif
3177 }
3178
3179 // update info based on new PC
3180 if (result == UNW_STEP_SUCCESS) {
3181 this->setInfoBasedOnIPRegister(true);
3182 if (_unwindInfoMissing)
3183 return UNW_STEP_END;
3184 }
3185
3186 return result;
3187}
3188
3189template <typename A, typename R>
3190void UnwindCursor<A, R>::getInfo(unw_proc_info_t *info) {

Callers 2

__unw_stepFunction · 0.80
__unw_step_stage2Function · 0.80

Calls 7

stepThroughSigReturnMethod · 0.95
stepWithSEHDataMethod · 0.95
stepWithTBTableDataMethod · 0.95
stepWithDwarfFDEMethod · 0.95
stepWithEHABIMethod · 0.95

Tested by

no test coverage detected