mlpack 3.4.2
backtrace.hpp
Go to the documentation of this file.
1
12#ifndef __MLPACK_CORE_UTIL_BACKTRACE_HPP
13#define __MLPACK_CORE_UTIL_BACKTRACE_HPP
14
15#include <string>
16#include <vector>
17
18namespace mlpack {
19
47{
48 public:
49#ifdef HAS_BFD_DL
56 Backtrace(int maxDepth = 32);
57#else
64#endif
66 std::string ToString();
67
68 private:
74 static void GetAddress(int maxDepth);
75
81 static void DecodeAddress(long address);
82
84 static void DemangleFunction();
85
87 struct Frames
88 {
89 void *address;
90 const char* function;
91 const char* file;
92 unsigned line;
93 } static frame;
94
96 static std::vector<Frames> stack;
97};
98
99}; // namespace mlpack
100
101#endif
Provides a backtrace.
Definition: backtrace.hpp:47
Backtrace()
Constructor initialize fields and call GetAddress to retrieve addresses for each frame of backtrace.
std::string ToString()
Returns string of backtrace.
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1