Function.caller_functions_recursive()

Returns a Functions object representing the functions which are called from the function

caller_functions_recursive() -> Functions

The function is the extended/inter-procedural variant of function caller_functions, meaning it works recursively. It returns the Functions object representing all the functions that are eventually called from within the function.

The difference between caller_functions_recursive() and caller_functions() is that the latter one will only return directly called functions, while the recursive version will find all the functions recursively that eventually get called from the target function.

Query Example

from glider import *


def query():
    functions = Functions().with_name('depositToken').exec(1,10)

    #lets take the first function from the result and return its extended_caller_functions
    output = functions[0].caller_functions_recursive().exec()

    #print the code of the function, to be aware of whose callers we get
    print(functions[0].source_code())

    return output

Example Output

Source code of depositToken :

Source code of extended caller functions:

Last updated