MRPT  2.0.4
backtrace.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
11 #include <string>
12 #include <vector>
13 
14 namespace mrpt::system
15 {
16 /** Used in getCallStackBackTrace() */
18 {
19  inline TCallStackEntry() : address(nullptr) {}
20  /** Address of the calling point */
21  void* address;
22  /** Demangled symbol name */
23  std::string symbolName;
24  /** Original (before demangle) symbol name */
25  std::string symbolNameOriginal;
26 };
27 
28 #ifdef _MSC_VER
29 template class std::vector<TCallStackEntry>;
30 #endif
31 
32 /** See: getCallStackBackTrace() */
34 {
36  std::vector<TCallStackEntry> backtrace_levels;
37 
38  /** Prints all backtrace entries, one per line in a human-readable format.
39  */
40  std::string asString() const;
41 };
42 
43 /** Returns a list of strings representing the current call stack
44  * backtrace. If possible, human-readable names are used for
45  * functions.
46  */
48 
49 } // namespace mrpt::system
Used in getCallStackBackTrace()
Definition: backtrace.h:17
void getCallStackBackTrace(TCallStackBackTrace &out_bt)
Returns a list of strings representing the current call stack backtrace.
Definition: backtrace.cpp:32
void * address
Address of the calling point.
Definition: backtrace.h:21
std::string symbolName
Demangled symbol name.
Definition: backtrace.h:23
TCallStackEntry()
Definition: backtrace.h:19
std::vector< TCallStackEntry > backtrace_levels
Definition: backtrace.h:36
std::string symbolNameOriginal
Original (before demangle) symbol name.
Definition: backtrace.h:25
See: getCallStackBackTrace()
Definition: backtrace.h:33



Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020