示例#1
0
uString* uGetStackTrace()
{
    Xli::StringBuilder sb;
    uThreadData* thread = uGetThreadData();

    for (int i = thread->CallStack.Length() - 1; i >= 0; i--)
    {
        if (sb.GetLength() > 0)
            sb += '\n';

        uCallStackFrame& frame = thread->CallStack[i];
        sb += "   at ";
        sb += frame.Type;
        sb += '.';
        sb += frame.Function;
    }

    return uStringFromXliString(sb.ToString());
}
示例#2
0
uString* uGetStackTrace()
{
    Xli::StringBuilder sb;
    uThreadData* thread = uGetThreadData();

    for (uCallStackFrame* frame = thread->CallStackPtr;
         frame >= thread->CallStack;
         frame--)
    {
        if (sb.GetLength() > 0)
            sb += '\n';

        sb += "   at ";
        sb += frame->Type;
        sb += '.';
        sb += frame->Function;
    }

    return uStringFromXliString(sb.ToString());
}