mlpack  3.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
18 namespace mlpack {
19 
46 class Backtrace
47 {
48  public:
49 #ifdef HAS_BFD_DL
50 
56  Backtrace(int maxDepth = 32);
57 #else
58 
63  Backtrace();
64 #endif
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
file(WRITE"${CMAKE_BINARY_DIR}/src/mlpack/bindings/go/src/mlpack.org/v1/mlpack/models.go""package mlpack""\n\n""/*\n") set(BINDING_SOURCES get_type.hpp get_param.hpp get_printable_param.hpp go_option.hpp mlpack/arma_util.h mlpack/arma_util.hpp mlpack/io_util.h mlpack/io_util.hpp print_class_defn.hpp print_defn_input.hpp print_defn_output.hpp print_doc.hpp print_doc_functions.hpp print_doc_functions_impl.hpp print_go.hpp print_go.cpp print_input_processing.hpp print_method_config.hpp print_method_init.hpp print_output_processing.hpp strip_type.hpp) set(CGO_SOURCES mlpack/arma_util.go mlpack/io_util.go mlpack/doc.go mlpack/numcsv.go mlpack/go.mod mlpack/go.sum) set(CAPI_SOURCES mlpack/capi/arma_util.h mlpack/capi/io_util.h) set(TEST_SOURCES tests/go_binding_test.go) add_custom_command(TARGET go_copy PRE_BUILD COMMAND $
Definition: CMakeLists.txt:52
std::string ToString()
Returns string of backtrace.
Backtrace()
Constructor initialize fields and call GetAddress to retrieve addresses for each frame of backtrace...
string(REGEX REPLACE".*#define MLPACK_VERSION_MINOR ([0-9]+).*""\\1"MLPACK_VERSION_MINOR"${VERSION_HPP_CONTENTS}") string(REGEX REPLACE".* "\\1" MLPACK_VERSION_PATCH "$
Definition: CMakeLists.txt:56
Provides a backtrace.
Definition: backtrace.hpp:46