aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/utils/backtrace/backtrace.h
blob: cd843d8cb4191ef21f41396852c9afd00637080e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#pragma once

#include <util/system/types.h>
#include <util/generic/string.h>
#include <util/generic/hash.h>

#include <functional>

bool SetSignalHandler(int signo, void (*handler)(int));
class IOutputStream;

void EnableKikimrBacktraceFormat();

namespace NYql {

namespace NBacktrace {
const int Limit = 400;

void RegisterKikimrFatalActions();
void AddAfterFatalCallback(const std::function<void(int)>& after);
void AddBeforeFatalCallback(const std::function<void(int)>& before);
void EnableKikimrSymbolize();

void KikimrBackTrace();
void KikimrBackTraceFormatImpl(IOutputStream*);
void KikimrBacktraceFormatImpl(IOutputStream* out, void* const* stack, size_t stackSize);

void SetModulesMapping(const THashMap<TString, TString>& mapping);

TString Symbolize(const TString& input, const THashMap<TString, TString>& mapping);

} /* namespace Backtrace */

} /* namespace NYql */