aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/libunwind
diff options
context:
space:
mode:
authoreeight <eeight@yandex-team.ru>2022-02-10 16:46:18 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:18 +0300
commit475c0a46f28166e83fd263badc7546377cddcabe (patch)
tree39c5a49b8aaad78fe390b6f1f2886bdbda40f3e7 /contrib/libs/libunwind
parenta6e0145a095c7bb3770d6e07aee301de5c73f96e (diff)
downloadydb-475c0a46f28166e83fd263badc7546377cddcabe.tar.gz
Restoring authorship annotation for <eeight@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/libunwind')
-rw-r--r--contrib/libs/libunwind/include/unwind.h30
-rw-r--r--contrib/libs/libunwind/src/UnwindLevel1.c34
2 files changed, 32 insertions, 32 deletions
diff --git a/contrib/libs/libunwind/include/unwind.h b/contrib/libs/libunwind/include/unwind.h
index 6949e063dd..d276eeb72c 100644
--- a/contrib/libs/libunwind/include/unwind.h
+++ b/contrib/libs/libunwind/include/unwind.h
@@ -200,21 +200,21 @@ extern EXCEPTION_DISPOSITION _GCC_specific_handler(EXCEPTION_RECORD *exc,
_Unwind_Personality_Fn pers);
#endif
-#ifdef _YNDX_LIBUNWIND_ENABLE_EXCEPTION_BACKTRACE
-
-#define _YNDX_LIBUNWIND_EXCEPTION_BACKTRACE_SIZE 128
-// NB. How to compute:
-// offsetof(__cxa_exception, unwindHeader) + (sizeof(_Unwind_Backtrace_Buffer) + 15) / 16 * 16 - sizeof(_Unwind_Backtrace_Buffer)
-// Correctness of this value is static_assert'd in contrib/libs/cxxsupp/libcxxrta/exception.cc
-#define _YNDX_LIBUNWIND_EXCEPTION_BACKTRACE_MAGIC_OFFSET 104
-#define _YNDX_LIBUNWIND_EXCEPTION_BACKTRACE_PRIMARY_CLASS 0xacadacadull
-#define _YNDX_LIBUNWIND_EXCEPTION_BACKTRACE_DEPENDENT_CLASS 0xddddacadull
-
-typedef struct _Unwind_Backtrace_Buffer {
- size_t size;
- void* backtrace[_YNDX_LIBUNWIND_EXCEPTION_BACKTRACE_SIZE];
-} _Unwind_Backtrace_Buffer;
-#endif
+#ifdef _YNDX_LIBUNWIND_ENABLE_EXCEPTION_BACKTRACE
+
+#define _YNDX_LIBUNWIND_EXCEPTION_BACKTRACE_SIZE 128
+// NB. How to compute:
+// offsetof(__cxa_exception, unwindHeader) + (sizeof(_Unwind_Backtrace_Buffer) + 15) / 16 * 16 - sizeof(_Unwind_Backtrace_Buffer)
+// Correctness of this value is static_assert'd in contrib/libs/cxxsupp/libcxxrta/exception.cc
+#define _YNDX_LIBUNWIND_EXCEPTION_BACKTRACE_MAGIC_OFFSET 104
+#define _YNDX_LIBUNWIND_EXCEPTION_BACKTRACE_PRIMARY_CLASS 0xacadacadull
+#define _YNDX_LIBUNWIND_EXCEPTION_BACKTRACE_DEPENDENT_CLASS 0xddddacadull
+
+typedef struct _Unwind_Backtrace_Buffer {
+ size_t size;
+ void* backtrace[_YNDX_LIBUNWIND_EXCEPTION_BACKTRACE_SIZE];
+} _Unwind_Backtrace_Buffer;
+#endif
#ifdef __cplusplus
}
#endif
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;