engine/crash/src/script_crash.cpp
/*# read backtrace recorded in a loaded crash dump
     *
     * A table is returned containing the addresses of the call stack.
     *
     * @name crash.get_backtrace
     * @param handle [type:number] crash dump handle
     * @return backtrace [type:table] table containing the backtrace
     */
read backtrace recorded in a loaded crash dump
A table is returned containing the addresses of the call stack.

@name crash.get_backtrace
@param handle [type:number] crash dump handle
@return backtrace [type:table] table containing the backtrace
read backtrace recorded in a loaded crash dump A table is returned containing the addresses of the call stack . @name crash . get_backtrace @param handle [ type : number ] crash dump handle @return backtrace [ type : table ] table containing the backtrace
static int Crash_GetBacktrace(lua_State* L)
    {
        int top = lua_gettop(L);
        HDump h = CheckHandle(L, 1);
        uint32_t count = GetBacktraceAddrCount(h);
        lua_newtable(L);
      for (uint32_t i=0;i!=count;i++)
        {
            char str[64];
            sprintf(str, "%p", GetBacktraceAddr(h, i));
            lua_pushnumber(L, i+1);
            lua_pushstring(L, str);
            lua_settable(L, -3);
        }
        assert(lua_gettop(L) == (top+1));
        return 1;
    }
static int Crash_GetBacktrace ( lua_State * L ) { int top = lua_gettop ( L ) ; HDump h = CheckHandle ( L , 1 ) ; uint32_t count = GetBacktraceAddrCount ( h ) ; lua_newtable ( L ) ; for ( uint32_t i = 0 ; i != count ; i ++ ) { char str [ 64 ] ; sprintf ( str , " " , GetBacktraceAddr ( h , i ) ) ; lua_pushnumber ( L , i + 1 ) ; lua_pushstring ( L , str ) ; lua_settable ( L , -3 ) ; } assert ( lua_gettop ( L ) == ( top + 1 ) ) ; return 1 ; }
read backtrace recorded in a loaded crash dump
 A table is returned containing the addresses of the call stack.
read backtrace recorded in a loaded crash dump A table is returned containing the addresses of the call stack .