aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/backtrace.cpp
diff options
context:
space:
mode:
authoreeight <eeight@yandex-team.ru>2022-02-10 16:46:19 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:19 +0300
commitbd085aee9b4f7a0bee302ce687964ffb7098f986 (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /util/system/backtrace.cpp
parent475c0a46f28166e83fd263badc7546377cddcabe (diff)
downloadydb-bd085aee9b4f7a0bee302ce687964ffb7098f986.tar.gz
Restoring authorship annotation for <eeight@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/system/backtrace.cpp')
-rw-r--r--util/system/backtrace.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/util/system/backtrace.cpp b/util/system/backtrace.cpp
index 1aa745c0cc..b77fe58fb1 100644
--- a/util/system/backtrace.cpp
+++ b/util/system/backtrace.cpp
@@ -243,7 +243,7 @@ void FormatBackTrace(IOutputStream* out, void* const* backtrace, size_t backtrac
}
}
-TFormatBackTraceFn FormatBackTraceFn = FormatBackTrace;
+TFormatBackTraceFn FormatBackTraceFn = FormatBackTrace;
TFormatBackTraceFn SetFormatBackTraceFn(TFormatBackTraceFn f) {
TFormatBackTraceFn prevFn = FormatBackTraceFn;
@@ -251,12 +251,12 @@ TFormatBackTraceFn SetFormatBackTraceFn(TFormatBackTraceFn f) {
return prevFn;
}
-void FormatBackTrace(IOutputStream* out) {
- void* array[300];
- const size_t s = BackTrace(array, Y_ARRAY_SIZE(array));
- FormatBackTraceFn(out, array, s);
-}
-
+void FormatBackTrace(IOutputStream* out) {
+ void* array[300];
+ const size_t s = BackTrace(array, Y_ARRAY_SIZE(array));
+ FormatBackTraceFn(out, array, s);
+}
+
TFormatBackTraceFn GetFormatBackTraceFn() {
return FormatBackTraceFn;
}
@@ -275,7 +275,7 @@ void TBackTrace::Capture() {
}
void TBackTrace::PrintTo(IOutputStream& out) const {
- FormatBackTraceFn(&out, Data, Size);
+ FormatBackTraceFn(&out, Data, Size);
}
TString TBackTrace::PrintToString() const {
@@ -283,7 +283,7 @@ TString TBackTrace::PrintToString() const {
PrintTo(ss);
return ss.Str();
}
-
+
size_t TBackTrace::size() const {
return Size;
}
@@ -296,12 +296,12 @@ TBackTrace::operator TBackTraceView() const {
return TBackTraceView(Data, Size);
}
-TBackTrace TBackTrace::FromCurrentException() {
-#ifdef _YNDX_LIBUNWIND_EXCEPTION_BACKTRACE_SIZE
- TBackTrace result;
- result.Size = __cxxabiv1::__cxa_collect_current_exception_backtrace(result.Data, CAPACITY);
- return result;
-#else
- return TBackTrace();
-#endif
-}
+TBackTrace TBackTrace::FromCurrentException() {
+#ifdef _YNDX_LIBUNWIND_EXCEPTION_BACKTRACE_SIZE
+ TBackTrace result;
+ result.Size = __cxxabiv1::__cxa_collect_current_exception_backtrace(result.Data, CAPACITY);
+ return result;
+#else
+ return TBackTrace();
+#endif
+}