The Sparta Modeling Framework
Loading...
Searching...
No Matches
sparta::app::BacktraceData Class Reference

Backtrace without line information. Can be rendered out when needed because rendering is slow. More...

#include <Backtrace.hpp>

Public Member Functions

 BacktraceData ()=default
 Construct the backtrace.
 
 BacktraceData (const BacktraceData &)=default
 Copy constructable.
 
BacktraceDataoperator= (const BacktraceData &)=delete
 Not copy-assignable.
 
void render (std::ostream &o, bool line_info=true) const
 Render the backtrace to a file.
 
void addFrame (void *addr, const char *message)
 Adds a new frame to the top of the backtrace (which is progressively more shallow in the real stack). The first frame added is called frame 1, the next: 2, and so on.
 

Detailed Description

Backtrace without line information. Can be rendered out when needed because rendering is slow.

Definition at line 32 of file Backtrace.hpp.

Member Function Documentation

◆ addFrame()

void sparta::app::BacktraceData::addFrame ( void *  addr,
const char *  message 
)

Adds a new frame to the top of the backtrace (which is progressively more shallow in the real stack). The first frame added is called frame 1, the next: 2, and so on.

Parameters
addrAddress
messageMessage describing this stack frame. Will be copied

◆ render()

void sparta::app::BacktraceData::render ( std::ostream &  o,
bool  line_info = true 
) const

Render the backtrace to a file.

Parameters
oOstream to write to
line_infoDisplay line info as part of back trace (in addition to symbols and address)

The documentation for this class was generated from the following file: