19 #ifndef CORE_POSIX_BACKTRACE_H_ 20 #define CORE_POSIX_BACKTRACE_H_ 58 virtual bool is_cxx()
const = 0;
63 virtual std::string
demangled()
const = 0;
69 virtual std::string
raw()
const = 0;
76 virtual ~Frame() =
default;
83 virtual std::size_t
depth()
const = 0;
122 #endif // CORE_POSIX_BACKTRACE_H_ virtual std::size_t depth() const =0
depth returns the depth of this frame in the overall backtrace.
The Frame class models an individual frame of a backtrace.
virtual ~Symbol()=default
std::function< bool(const Frame &frame)> FrameHandler
FrameHandler is the functor invoked for every frame of a backtrace.
void visit_with_handler(const FrameHandler &handler)
visit_with_handler iterates the backtrace of the calling program, invoking the handler for every fram...
static std::shared_ptr< Symbol > for_testing_from_raw_symbol(const char *symbol)
virtual const Symbol & symbol() const =0
symbol returns the symbolic representation of this frame.
The Symbol class models the symbolic representation of a frame pointer.
virtual std::string raw() const =0
raw The raw symbolic representation of a frame pointer.
virtual std::string demangled() const =0
demangled returns the demangled C++ symbol name or raw.
virtual void * frame_pointer() const =0
frame_pointer returns the the raw frame pointer of this frame.
virtual bool is_cxx() const =0
is_cxx checks whether the symbol refers to a mangled C++ symbol.
Symbol & operator=(const Symbol &)=delete