MCPcopy Create free account
hub / github.com/Xtra-Computing/thundersvm / StackTrace

Class StackTrace

include/thundersvm/util/log.h:3600–3639  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3598 namespace debug {
3599#if defined(ELPP_FEATURE_ALL) || defined(ELPP_FEATURE_CRASH_LOG)
3600 class StackTrace : base::NoCopy {
3601 public:
3602 static const unsigned int kMaxStack = 64;
3603 static const unsigned int kStackStart = 2; // We want to skip c'tor and StackTrace::generateNew()
3604 class StackTraceEntry {
3605 public:
3606 StackTraceEntry(std::size_t index, const char* loc, const char* demang, const char* hex, const char* addr);
3607 StackTraceEntry(std::size_t index, char* loc) :
3608 m_index(index),
3609 m_location(loc) {
3610 }
3611 std::size_t m_index;
3612 std::string m_location;
3613 std::string m_demangled;
3614 std::string m_hex;
3615 std::string m_addr;
3616 friend std::ostream& operator<<(std::ostream& ss, const StackTraceEntry& si);
3617
3618 private:
3619 StackTraceEntry(void);
3620 };
3621
3622 StackTrace(void) {
3623 generateNew();
3624 }
3625
3626 virtual ~StackTrace(void) {
3627 }
3628
3629 inline std::vector<StackTraceEntry>& getLatestStack(void) {
3630 return m_stack;
3631 }
3632
3633 friend std::ostream& operator<<(std::ostream& os, const StackTrace& st);
3634
3635 private:
3636 std::vector<StackTraceEntry> m_stack;
3637
3638 void generateNew(void);
3639};
3640/// @brief Handles unexpected crashes
3641class CrashHandler : base::NoCopy {
3642 public:

Callers 1

logCrashReasonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected