def printInvocationForFrame()

in commands/FBInvocationCommands.py [0:0]


def printInvocationForFrame(frame):
    print(frame)

    symbolName = frame.GetSymbol().GetName()
    if not re.match(r"[-+]\s*\[.*\]", symbolName):
        return

    self = findArgAtIndexFromStackFrame(frame, 0)
    cmd = findArgAtIndexFromStackFrame(frame, 1)

    commandForSignature = (
        "[(id)"
        + self
        + " methodSignatureForSelector:(char *)sel_getName((SEL)"
        + cmd
        + ")]"
    )
    signatureValue = fb.evaluateExpressionValue("(id)" + commandForSignature)

    if (
        signatureValue.GetError() is not None
        and str(signatureValue.GetError()) != "success"
    ):
        print(
            "My sincerest apologies. I couldn't find a method signature for the selector."
        )
        return

    signature = signatureValue.GetValue()

    arg0 = stackStartAddressInSelectedFrame(frame)
    commandForInvocation = (
        "[NSInvocation _invocationWithMethodSignature:(id)"
        + signature
        + " frame:((void *)"
        + str(arg0)
        + ")]"
    )
    invocation = fb.evaluateExpression("(id)" + commandForInvocation)

    if invocation:
        prettyPrintInvocation(frame, invocation)
    else:
        print(frame)