aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/backtrace.cpp
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 /util/system/backtrace.cpp
parenta6e0145a095c7bb3770d6e07aee301de5c73f96e (diff)
downloadydb-475c0a46f28166e83fd263badc7546377cddcabe.tar.gz
Restoring authorship annotation for <eeight@yandex-team.ru>. Commit 1 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 b77fe58fb1..1aa745c0cc 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
+}