diff options
author | eeight <eeight@yandex-team.ru> | 2022-02-10 16:46:18 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:18 +0300 |
commit | 475c0a46f28166e83fd263badc7546377cddcabe (patch) | |
tree | 39c5a49b8aaad78fe390b6f1f2886bdbda40f3e7 /contrib/libs/libunwind/src/UnwindLevel1.c | |
parent | a6e0145a095c7bb3770d6e07aee301de5c73f96e (diff) | |
download | ydb-475c0a46f28166e83fd263badc7546377cddcabe.tar.gz |
Restoring authorship annotation for <eeight@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/libunwind/src/UnwindLevel1.c')
-rw-r--r-- | contrib/libs/libunwind/src/UnwindLevel1.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/contrib/libs/libunwind/src/UnwindLevel1.c b/contrib/libs/libunwind/src/UnwindLevel1.c index 13ca17cc6a..2480511563 100644 --- a/contrib/libs/libunwind/src/UnwindLevel1.c +++ b/contrib/libs/libunwind/src/UnwindLevel1.c @@ -71,15 +71,15 @@ static _Unwind_Reason_Code unwind_phase1(unw_context_t *uc, unw_cursor_t *cursor, _Unwind_Exception *exception_object) { __unw_init_local(cursor, uc); -#ifdef _YNDX_LIBUNWIND_ENABLE_EXCEPTION_BACKTRACE - _Unwind_Backtrace_Buffer* backtrace_buffer = - exception_object->exception_class == _YNDX_LIBUNWIND_EXCEPTION_BACKTRACE_PRIMARY_CLASS || - exception_object->exception_class == _YNDX_LIBUNWIND_EXCEPTION_BACKTRACE_DEPENDENT_CLASS ? - (_Unwind_Backtrace_Buffer *)( - (char*)exception_object - _YNDX_LIBUNWIND_EXCEPTION_BACKTRACE_MAGIC_OFFSET) - 1 - : NULL; -#endif - +#ifdef _YNDX_LIBUNWIND_ENABLE_EXCEPTION_BACKTRACE + _Unwind_Backtrace_Buffer* backtrace_buffer = + exception_object->exception_class == _YNDX_LIBUNWIND_EXCEPTION_BACKTRACE_PRIMARY_CLASS || + exception_object->exception_class == _YNDX_LIBUNWIND_EXCEPTION_BACKTRACE_DEPENDENT_CLASS ? + (_Unwind_Backtrace_Buffer *)( + (char*)exception_object - _YNDX_LIBUNWIND_EXCEPTION_BACKTRACE_MAGIC_OFFSET) - 1 + : NULL; +#endif + // Walk each frame looking for a place to stop. while (true) { // Ask libunwind to get next frame (skip over first which is @@ -99,14 +99,14 @@ unwind_phase1(unw_context_t *uc, unw_cursor_t *cursor, _Unwind_Exception *except return _URC_FATAL_PHASE1_ERROR; } -#ifdef _YNDX_LIBUNWIND_ENABLE_EXCEPTION_BACKTRACE - if (backtrace_buffer && backtrace_buffer->size < _YNDX_LIBUNWIND_EXCEPTION_BACKTRACE_SIZE) { - unw_word_t pc; - __unw_get_reg(cursor, UNW_REG_IP, &pc); - backtrace_buffer->backtrace[backtrace_buffer->size++] = (void *)pc; - } -#endif - +#ifdef _YNDX_LIBUNWIND_ENABLE_EXCEPTION_BACKTRACE + if (backtrace_buffer && backtrace_buffer->size < _YNDX_LIBUNWIND_EXCEPTION_BACKTRACE_SIZE) { + unw_word_t pc; + __unw_get_reg(cursor, UNW_REG_IP, &pc); + backtrace_buffer->backtrace[backtrace_buffer->size++] = (void *)pc; + } +#endif + // See if frame has code to run (has personality routine). unw_proc_info_t frameInfo; unw_word_t sp; |