Open Search
    StackTrace Class Reference

    #include <stacktrace.h>

    Static Public Member Functions

    static Int GetBacktrace (Int skip, const Block< void * > &functionPointers)
     
    static MAXON_METHOD Bool FindSymbol (const void *function, const Block< Char > &name, const Block< Char > &module, Int &offset)
     

    Private Member Functions

     MAXON_INTERFACE_NONVIRTUAL (StackTrace, MAXON_REFERENCE_STATIC, "net.maxon.interface.stacktrace", MAXON_IMPLEMENTATION_MODULE("net.maxon.kernel"))
     

    Member Function Documentation

    ◆ MAXON_INTERFACE_NONVIRTUAL()

    MAXON_INTERFACE_NONVIRTUAL ( StackTrace  ,
    MAXON_REFERENCE_STATIC  ,
    "net.maxon.interface.stacktrace"  ,
    MAXON_IMPLEMENTATION_MODULE("net.maxon.kernel")   
    )
    private

    ◆ GetBacktrace()

    static Int GetBacktrace ( Int  skip,
    const Block< void * > &  functionPointers 
    )
    static

    Returns a back trace of the current thread's call stack. The array is terminated with a nullptr if not all entries are used.

    Parameters
    [in]skipThe number of stack frames at the start of trace to be skipped.
    [in,out]functionPointersUsed to store the function pointers on the stack.
    Returns
    The number of pointers returned.

    ◆ FindSymbol()

    static MAXON_METHOD Bool FindSymbol ( const void *  function,
    const Block< Char > &  name,
    const Block< Char > &  module,
    Int offset 
    )
    static

    Searches the symbol belonging to the function pointer. If available the module name and offset in the function are returned as well.

    Parameters
    [in]functionFunction pointer from the call stack.
    [in,out]nameUsed to return the function name.
    [in,out]moduleUsed to return the module name if available.
    [out]offsetUsed to return the offset within the function if available.
    Returns
    True if the function name could be determined (otherwise name contains the pointer as string).