Tracer  v0.0.1
A platform independant stack trace generator
tracer.h File Reference
#include <stddef.h>
#include <stdint.h>
+ Include dependency graph for tracer.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tr_TracerHandler_Config
 Configuration. More...
 
struct  tr_DefaultPrinter_Config
 User configuration structure. More...
 
struct  tr_Frame
 Represents a stack frame. More...
 
struct  tr_Tracer_AvailableEngines
 Helper structure for wrapping the small std::vector's. More...
 

Typedefs

typedef enum TR_BOOL TR_BOOL_t
 Define some our own boolean values.
 
typedef enum TR_TraceerEngines TR_TraceerEngines_t
 Wrapper for tracer::TracerEngines.
 
typedef enum TR_DebuggerEngines TR_DebuggerEngines_t
 Wrapper for tracer::DebuggerEngines.
 
typedef void(* tr_callBackPTR) (void *tracer, void *printer, void *userData)
 C user callback for the signal handler.
 
typedef struct tr_TracerHandler tr_TracerHandler_t
 Manages TracerHandler.
 
typedef struct tr_TracerHandler_Config tr_TracerHandler_Config_t
 Configuration.
 
typedef struct tr_Tracer tr_Tracer_t
 Private struct to manage Tracer.
 
typedef struct tr_Tracer_AvailableEngines tr_Tracer_AvailableEngines_t
 Typedef to make things easier in c.
 
typedef struct tr_PrinterContainer tr_Printer_t
 Manages PrinterContainer.
 
typedef struct tr_Frame tr_Frame_t
 Represents a stack frame.
 
typedef struct tr_DefaultPrinter_Config tr_DefaultPrinter_Config_t
 User configuration structure.
 

Enumerations

enum  TR_BOOL { TR_FALSE, TR_TRUE }
 Private struct to manage PrinterContainer. More...
 
enum  TR_TraceerEngines {
  TR_E_END = 0, TR_LIBUNWIND, TR_GLIBC, TR_WIN32_TRACER,
  TR_DUMMY_T
}
 Wrapper for tracer::TracerEngines.
 
enum  TR_DebuggerEngines {
  TR_D_END = 0, TR_LIBDWFL, TR_LIBBFD, TR_WIN32_INFO,
  TR_EXTERNAL_FALLBACK, TR_DUMMY_D
}
 Wrapper for tracer::DebuggerEngines.
 

Functions

void tr_defaultSetup ()
 Runs tracer::TracerHandler::getTracer()->defaultSetup();.
 
tr_TracerHandler_ttr_getTracerHandler ()
 Retunrns the handler as a private c struct.
 
void tr_freeTracerHandler (tr_TracerHandler_t *trTH)
 Frees the handler. More...
 
void tr_TracerHandler__reset ()
 Wrapper for tracer::TracerHandler::reset.
 
TR_BOOL_t tr_TracerHandler__defaultSetup (tr_TracerHandler_t *trTH)
 Wrapper for tracer::TracerHandler::defaultSetup.
 
TR_BOOL_t tr_TracerHandler__setup (tr_TracerHandler_t *trTH, tr_Printer_t *pContainer)
 Wrapper for tracer::TracerHandler::setup.
 
tr_TracerHandler_Config_t tr_TracerHandler__getConfig (tr_TracerHandler_t *trTH)
 Wrapper for tracer::TracerHandler::getConfig.
 
void tr_TracerHandler__setConfig (tr_TracerHandler_t *trTH, tr_TracerHandler_Config_t cfg)
 Wrapper for tracer::TracerHandler::setConfig.
 
tr_Tracer_ttr_getTracer ()
 Wrapper for tracer::Tracer::Tracer.
 
tr_Tracer_ttr_getTracerWithParam (TR_TraceerEngines_t tracer, TR_DebuggerEngines_t debugInfo)
 Wrapper for tracer::Tracer::Tracer(TraceerEngines, DebuggerEngines)
 
tr_Tracer_ttr_getTracerFromVoid (void *tVoid)
 Creates the priavet C struct form a void pointer to the C++ Tracer object.
 
void tr_Tracer__trace (tr_Tracer_t *tracer)
 Wrapper for tracer::Tracer::trace.
 
size_t tr_Tracer__getNumFrames (tr_Tracer_t *tracer)
 (Indirect) Wrapper for tracer::Tracer::getFrames More...
 
tr_Frame_t tr_Tracer__getFrame (tr_Tracer_t *tracer, size_t frameNum)
 (Indirect) Wrapper for tracer::Tracer::getFrames More...
 
tr_Tracer_AvailableEngines_t tr_Tracer__getAvailableEngines ()
 (Indirect) Wrapper for tracer::Tracer::getAvailableEngines and tracer::Tracer::getAvailableDebuggers
 
void tr_freeTracer (tr_Tracer_t *tracer)
 Destroyes the private C object and the Tracer C++ object UNLESS tr_getTracerFromVoid was used.
 
tr_Printer_ttr_getPrinter (void *printer)
 Manages the Printer.
 
tr_Printer_ttr_getPrinter__fancy ()
 Wrapper for tracer::PrinterContainer::fancy.
 
tr_Printer_ttr_getPrinter__file ()
 Wrapper for tracer::PrinterContainer::file.
 
tr_Printer_ttr_getPrinter__system ()
 Wrapper for tracer::PrinterContainer::system.
 
tr_Printer_ttr_getPrinter__plain ()
 Wrapper for tracer::PrinterContainer::plain.
 
void * tr_PrinterContainer__get (tr_Printer_t *pContainer)
 Wrapper for tracer::PrinterContainer::get.
 
void tr_freePrinter (tr_Printer_t *pContainer)
 Frees the Printer container.
 
void tr_Printer__genStringPreFrame (tr_Printer_t *p, size_t frameNum, char **outStr, TR_BOOL_t *castOK)
 Wrapper for tracer::AbstractPrinter::genStringPreFrame.
 
void tr_Printer__genStringForFrame (tr_Printer_t *p, size_t frameNum, char **outStr, TR_BOOL_t *castOK)
 Wrapper for tracer::AbstractPrinter::genStringForFrame.
 
void tr_Printer__genStringPostFrame (tr_Printer_t *p, size_t frameNum, char **outStr, TR_BOOL_t *castOK)
 Wrapper for tracer::AbstractPrinter::genStringPostFrame.
 
void tr_Printer__generateString (tr_Printer_t *p, char **outStr, TR_BOOL_t *castOK)
 Wrapper for tracer::AbstractPrinter::generateString.
 
void tr_Printer__printToFile (tr_Printer_t *p, const char *file, TR_BOOL_t append, TR_BOOL_t *castOK)
 Wrapper for tracer::AbstractPrinter::printToFile.
 
void tr_Printer__printToStdOut (tr_Printer_t *p, TR_BOOL_t *castOK)
 Wrapper for tracer::AbstractPrinter::printToStdOut.
 
void tr_Printer__printToStdErr (tr_Printer_t *p, TR_BOOL_t *castOK)
 Wrapper for tracer::AbstractPrinter::printToStdErr.
 
void tr_Printer__enableColor (tr_Printer_t *p, TR_BOOL_t *castOK)
 Wrapper for tracer::AbstractPrinter::enableColor.
 
void tr_Printer__disableColor (tr_Printer_t *p, TR_BOOL_t *castOK)
 Wrapper for tracer::AbstractPrinter::disableColor.
 
void tr_Printer__setTrace (tr_Printer_t *p, tr_Tracer_t *t, TR_BOOL_t *castOK)
 Wrapper for tracer::AbstractPrinter::setTrace.
 
tr_DefaultPrinter_Config_t tr_Printer__getConfig (tr_Printer_t *p, TR_BOOL_t *castOK)
 Wrapper for tracer::DefaultPrinter::getConfig.
 
void tr_Printer__setConfig (tr_Printer_t *p, tr_DefaultPrinter_Config_t cfg, TR_BOOL_t *castOK)
 Wrapper for tracer::DefaultPrinter::setConfig.
 
void tr_Printer__setSignum (tr_Printer_t *p, int signum, TR_BOOL_t *castOK)
 Wrapper for tracer::SystemInfoPrinter::setSignum.
 
void tr_Printer__addSystemEntry (tr_Printer_t *p, const char *name, const char *value, TR_BOOL_t *castOK)
 Wrapper for tracer::SystemInfoPrinter::addSystemEntry.
 

Enumeration Type Documentation

◆ TR_BOOL

enum TR_BOOL

Private struct to manage PrinterContainer.

Define some our own boolean values

Definition at line 50 of file tracer.h.

Function Documentation

◆ tr_freeTracerHandler()

void tr_freeTracerHandler ( tr_TracerHandler_t trTH)

Frees the handler.

Note
This does not effect the C++ class

Definition at line 58 of file cTracerHandler.cpp.

◆ tr_Tracer__getFrame()

tr_Frame_t tr_Tracer__getFrame ( tr_Tracer_t tracer,
size_t  frameNum 
)

(Indirect) Wrapper for tracer::Tracer::getFrames

See also
tr_Tracer__getNumFrames

Definition at line 83 of file cTracer.cpp.

+ Here is the call graph for this function:

◆ tr_Tracer__getNumFrames()

size_t tr_Tracer__getNumFrames ( tr_Tracer_t tracer)

(Indirect) Wrapper for tracer::Tracer::getFrames

See also
tr_Tracer__getFrame

Definition at line 72 of file cTracer.cpp.

+ Here is the call graph for this function: