Ejemplo n.º 1
0
static Xli::String uGetCaller()
{
    uThreadData* thread = uGetThreadData();

    if (thread->CallStackPtr < thread->CallStack)
        return "";

    Xli::StringBuilder sb;
    uCallStackFrame* frame = thread->CallStackPtr;
    sb += " -- at ";
    sb += frame->Type;
    sb += '.';
    sb += frame->Function;
    return sb.ToString();
}
Ejemplo n.º 2
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());
}
Ejemplo n.º 3
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());
}