Tracer
v0.0.1
A platform independant stack trace generator
|
Gnerates strings from the frame structure. More...
#include <DefaultPrinter.hpp>
Classes | |
struct | Config |
User configuration structure. More... | |
Public Member Functions | |
void | setConfig (Config newCfg) |
Sets the new config. | |
Config | getConfig () const |
Returns the current. | |
Public Member Functions inherited from tracer::AbstractPrinter | |
AbstractPrinter () | |
Default constructor. | |
std::string | genStringPreFrame (size_t frameNum) |
Generates a string for the frame information (prefix) More... | |
std::string | genStringForFrame (size_t frameNum) |
Generates a string for the frame information. More... | |
std::string | genStringPostFrame (size_t frameNum) |
Generates a string for the frame information (suffix) More... | |
std::string | generateString () |
Generates a string for the complete stack trace. More... | |
void | printToFile (std::string file, bool append=true) |
Prints the stack trace to a file. More... | |
void | printToStdOut () |
prints the stack trace to STDOUT | |
void | printToStdErr () |
prints the stack trace to STDERR | |
void | enableColor () |
Enables colored output (ANSI escape sequences) | |
void | disableColor () |
Disables colored output (ANSI escape sequences) | |
void | setTrace (Tracer *t) |
Sets the trace to print. More... | |
Protected Member Functions | |
std::string | genStringForFrameIMPL (size_t frameNum) override |
Generate string for the frame info. | |
void | setupTrace () override |
This function will be called when the trace is sets. | |
Protected Member Functions inherited from tracer::AbstractPrinter | |
virtual std::string | genStringPreFrameIMPL (size_t frameNum) |
Generate string for the frame info prefix. More... | |
virtual std::string | genStringPostFrameIMPL (size_t frameNum) |
Generate string for the frame info suffix. More... | |
Additional Inherited Members | |
Protected Attributes inherited from tracer::AbstractPrinter | |
Tracer * | trace = nullptr |
Pointer to the trace. | |
bool | disableColorB = false |
Whether to disable colored output or not. | |
Gnerates strings from the frame structure.
The generated string has the form (by default)
#[numOfFrame] in functionName at fileLocation – binaryFile [address]
This cam be configured with the DefaultPrinter::Config struct
Definition at line 44 of file DefaultPrinter.hpp.