28 #include "defines.hpp" 48 tr_Tracer_t *t =
new tr_Tracer_t(static_cast<TraceerEngines>(tracer), static_cast<DebuggerEngines>(debugInfo));
74 return numeric_limits<size_t>::max();
85 memset(&frame, 0,
sizeof(frame));
92 if (frameNum >= frames->size())
95 auto &f = frames->at(frameNum);
103 if ((f.flags & FrameFlags::HAS_FUNC_NAME) != FrameFlags::HAS_FUNC_NAME)
106 if ((f.flags & FrameFlags::HAS_MODULE_INFO) != FrameFlags::HAS_MODULE_INFO)
109 if ((f.flags & FrameFlags::HAS_LINE_INFO) != FrameFlags::HAS_LINE_INFO)
120 memset(&result, 0,
sizeof(result));
const char * funcName
The name of the function.
TR_DebuggerEngines_t debuggers[8]
List of available engines; First try them for the Tracer (0 marks the end)
int line
The line number in the source file.
tr_Tracer_AvailableEngines_t tr_Tracer__getAvailableEngines()
(Indirect) Wrapper for tracer::Tracer::getAvailableEngines and tracer::Tracer::getAvailableDebuggers ...
const char * fileName
The name / path of the source file.
tracer::Tracer tracer
Tracer object.
tr_Tracer_t * tr_getTracerFromVoid(void *tVoid)
Creates the priavet C struct form a void pointer to the C++ Tracer object.
tr_Frame_t tr_Tracer__getFrame(tr_Tracer_t *tracer, size_t frameNum)
(Indirect) Wrapper for tracer::Tracer::getFrames
TR_TraceerEngines_t tracer[8]
List of available engines; First try them for the Tracer (0 marks the end)
tr_Tracer_t * tr_getTracerWithParam(TR_TraceerEngines_t tracer, TR_DebuggerEngines_t debugInfo)
Wrapper for tracer::Tracer::Tracer(TraceerEngines, DebuggerEngines)
tr_Tracer_t * tr_getTracer()
Wrapper for tracer::Tracer::Tracer.
static std::vector< TraceerEngines > getAvailableEngines()
Returns a list of available tracer engines.
const char * moduleName
The name / path of the binary file.
Represents a stack frame.
Internal C wrapper structure.
Address frameAddr
The instruction pointer of the stack frame.
Helper structure for wrapping the small std::vector's.
enum TR_DebuggerEngines TR_DebuggerEngines_t
Wrapper for tracer::DebuggerEngines.
static std::vector< DebuggerEngines > getAvailableDebuggers()
Returns a list of available debug info engines.
std::vector< Frame > * getFrames()
Returns a pointer to the stack frames.
size_t tr_Tracer__getNumFrames(tr_Tracer_t *tracer)
(Indirect) Wrapper for tracer::Tracer::getFrames
void tr_Tracer__trace(tr_Tracer_t *tracer)
Wrapper for tracer::Tracer::trace.
int column
The column in the source file.
struct tr_Tracer tr_Tracer_t
Private struct to manage Tracer.
enum TR_TraceerEngines TR_TraceerEngines_t
Wrapper for tracer::TracerEngines.
std::vector< Frame > * trace()
Generates the stack trace.
tracer::Tracer * tPTR
Pointer to the tracer object to use.
void tr_freeTracer(tr_Tracer_t *tracer)
Destroyes the private C object and the Tracer C++ object UNLESS tr_getTracerFromVoid was used...