Ion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
stacktrace.h
Go to the documentation of this file.
1 
18 #ifndef ION_PORT_STACKTRACE_H_
19 #define ION_PORT_STACKTRACE_H_
20 
21 #include <string>
22 #include <vector>
23 
24 namespace ion {
25 namespace port {
26 
33 class ION_API StackTrace {
34  public:
35  StackTrace();
38  const std::vector<void*>& GetAddresses() const { return addresses_; }
40  const std::vector<std::string>& GetSymbols() const;
43  const std::string GetSymbolString() const;
44 
45  private:
47  void ObtainSymbols() const;
48 
49  std::vector<void*> addresses_;
51  mutable std::vector<std::string> symbols_;
52 };
53 
54 } // namespace port
55 } // namespace ion
56 
57 #endif // ION_PORT_STACKTRACE_H_
const std::vector< void * > & GetAddresses() const
Returns the stack as a vector of addresses.
Definition: stacktrace.h:38
StackTrace acquires a stack trace for the current thread (not suitable for calling in an interrupt ha...
Definition: stacktrace.h:33