Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
#include <stacktraces.h>
#include <fs.h>
#include <tinyformat.h>
#include <random.h>
#include <streams.h>
#include <util.h>
#include <utilstrencodings.h>
#include <dash-config.h>
#include <mutex>
#include <map>
#include <string>
#include <vector>
#include <memory>
#include <thread>
#include <atomic>
#include <cxxabi.h>
#include <execinfo.h>
#include <unistd.h>
#include <signal.h>
#include <dlfcn.h>
#include <link.h>
#include <backtrace.h>
#include <string.h>
Go to the source code of this file.
Classes | |
struct | stackframe_info |
struct | crash_info_header |
struct | crash_info |
Functions | |
std::string | DemangleSymbol (const std::string &name) |
static std::atomic< bool > | skipAbortSignal (false) |
static ssize_t | GetExeFileNameImpl (char *buf, size_t bufSize) |
static std::string | GetExeFileName () |
static void | my_backtrace_error_callback (void *data, const char *msg, int errnum) |
static backtrace_state * | GetLibBacktraceState () |
static int | dl_iterate_callback (struct dl_phdr_info *info, size_t s, void *data) |
static uint64_t | GetBaseAddress () |
static | __attribute__ ((noinline)) std |
static int | my_backtrace_full_callback (void *data, uintptr_t pc, const char *filename, int lineno, const char *function) |
static std::vector< stackframe_info > | GetStackFrameInfos (const std::vector< uint64_t > &stackframes) |
static std::string | GetCrashInfoStrNoDebugInfo (crash_info ci) |
static std::string | GetCrashInfoStr (const crash_info &ci, size_t spaces=2) |
std::string | GetCrashInfoStrFromSerializedStr (const std::string &ciStr) |
static void | PrintCrashInfo (const crash_info &ci) |
static std::shared_ptr< std::vector< uint64_t > > | GetExceptionStacktrace (const std::exception_ptr &e) |
crash_info | GetCrashInfoFromException (const std::exception_ptr &e) |
std::string | GetPrettyExceptionStr (const std::exception_ptr &e) |
static void | terminate_handler () |
void | RegisterPrettyTerminateHander () |
static void | HandlePosixSignal (int s) |
void | RegisterPrettySignalHandlers () |
Variables | |
static std::string | g_exeFileName = GetExeFileName() |
static std::string | g_exeFileBaseName = fs::path(g_exeFileName).filename().string() |
Function Documentation
◆ __attribute__()
|
static |
Definition at line 276 of file stacktraces.cpp.
References count.
◆ DemangleSymbol()
std::string DemangleSymbol | ( | const std::string & | name | ) |
Definition at line 51 of file stacktraces.cpp.
References name.
Referenced by GetCrashInfoFromException(), and my_backtrace_full_callback().
◆ dl_iterate_callback()
|
static |
Definition at line 259 of file stacktraces.cpp.
Referenced by GetBaseAddress().
◆ GetBaseAddress()
|
static |
Definition at line 268 of file stacktraces.cpp.
References dl_iterate_callback().
Referenced by GetCrashInfoStrFromSerializedStr(), and GetCrashInfoStrNoDebugInfo().
◆ GetCrashInfoFromException()
crash_info GetCrashInfoFromException | ( | const std::exception_ptr & | e | ) |
Definition at line 680 of file stacktraces.cpp.
References crash_info::crashDescription, DemangleSymbol(), GetExceptionStacktrace(), GetExceptionWhat(), GetStackFrameInfos(), crash_info::stackframeInfos, crash_info::stackframes, and strprintf.
Referenced by GetPrettyExceptionStr(), and terminate_handler().
◆ GetCrashInfoStr()
|
static |
Definition at line 468 of file stacktraces.cpp.
References crash_info::crashDescription, GetCrashInfoStrNoDebugInfo(), crash_info::stackframeInfos, and strprintf.
Referenced by GetCrashInfoStrFromSerializedStr(), GetPrettyExceptionStr(), and PrintCrashInfo().
◆ GetCrashInfoStrFromSerializedStr()
std::string GetCrashInfoStrFromSerializedStr | ( | const std::string & | ciStr | ) |
Definition at line 422 of file stacktraces.cpp.
References crash_info::ConvertAddresses(), DecodeBase32(), crash_info_header::exeFileName, g_exeFileBaseName, GetBaseAddress(), GetCrashInfoStr(), GetStackFrameInfos(), crash_info_header::magic, SER_DISK, crash_info::stackframeInfos, crash_info::stackframes, and crash_info_header::version.
Referenced by AppInit(), AppInitRawTx(), AppInitRPC(), and main().
◆ GetCrashInfoStrNoDebugInfo()
|
static |
Definition at line 398 of file stacktraces.cpp.
References crash_info::ConvertAddresses(), CDataStream::data(), EncodeBase32(), crash_info_header::exeFileName, g_exeFileBaseName, GetBaseAddress(), crash_info_header::magic, SER_DISK, CDataStream::size(), strprintf, and crash_info_header::version.
Referenced by GetCrashInfoStr().
◆ GetExceptionStacktrace()
|
static |
Definition at line 664 of file stacktraces.cpp.
Referenced by GetCrashInfoFromException().
◆ GetExeFileName()
|
static |
Definition at line 102 of file stacktraces.cpp.
References GetExeFileNameImpl().
◆ GetExeFileNameImpl()
|
static |
Definition at line 73 of file stacktraces.cpp.
Referenced by GetExeFileName().
◆ GetLibBacktraceState()
|
static |
Definition at line 125 of file stacktraces.cpp.
References g_exeFileName, and my_backtrace_error_callback().
Referenced by GetStackFrameInfos().
◆ GetPrettyExceptionStr()
std::string GetPrettyExceptionStr | ( | const std::exception_ptr & | e | ) |
Definition at line 732 of file stacktraces.cpp.
References GetCrashInfoFromException(), and GetCrashInfoStr().
Referenced by PrintExceptionContinue().
◆ GetStackFrameInfos()
|
static |
Definition at line 340 of file stacktraces.cpp.
References GetLibBacktraceState(), my_backtrace_error_callback(), and my_backtrace_full_callback().
Referenced by GetCrashInfoFromException(), GetCrashInfoStrFromSerializedStr(), HandlePosixSignal(), and terminate_handler().
◆ HandlePosixSignal()
|
static |
Definition at line 768 of file stacktraces.cpp.
References crash_info::crashDescription, GetStackFrameInfos(), name, PrintCrashInfo(), skipAbortSignal(), crash_info::stackframeInfos, crash_info::stackframes, and strprintf.
Referenced by RegisterPrettySignalHandlers().
◆ my_backtrace_error_callback()
|
static |
Definition at line 120 of file stacktraces.cpp.
Referenced by GetLibBacktraceState(), and GetStackFrameInfos().
◆ my_backtrace_full_callback()
|
static |
Definition at line 313 of file stacktraces.cpp.
References DemangleSymbol(), stackframe_info::filename, stackframe_info::function, stackframe_info::lineno, and stackframe_info::pc.
Referenced by GetStackFrameInfos().
◆ PrintCrashInfo()
|
static |
Definition at line 524 of file stacktraces.cpp.
References GetCrashInfoStr(), and LogPrintf.
Referenced by HandlePosixSignal(), and terminate_handler().
◆ RegisterPrettySignalHandlers()
void RegisterPrettySignalHandlers | ( | ) |
Definition at line 842 of file stacktraces.cpp.
References HandlePosixSignal().
Referenced by main().
◆ RegisterPrettyTerminateHander()
void RegisterPrettyTerminateHander | ( | ) |
Definition at line 762 of file stacktraces.cpp.
References terminate_handler().
Referenced by main().
◆ skipAbortSignal()
|
static |
Referenced by HandlePosixSignal(), and terminate_handler().
◆ terminate_handler()
|
static |
Definition at line 737 of file stacktraces.cpp.
References crash_info::crashDescription, GetCrashInfoFromException(), GetStackFrameInfos(), PrintCrashInfo(), skipAbortSignal(), crash_info::stackframeInfos, crash_info::stackframes, and strprintf.
Referenced by RegisterPrettyTerminateHander().
Variable Documentation
◆ g_exeFileBaseName
|
static |
Definition at line 118 of file stacktraces.cpp.
Referenced by GetCrashInfoStrFromSerializedStr(), and GetCrashInfoStrNoDebugInfo().
◆ g_exeFileName
|
static |
Definition at line 117 of file stacktraces.cpp.
Referenced by GetLibBacktraceState().