CalleesMatchingParam object defines the parameters used to enumerate and annotate specified function callees.
It is used with the ProjectHandle:callees_matching method to filter and analyze call sites based on function names, predicates, and dataflow annotations.
Fields
Reference
from
The function(s) whose callees are enumerated. It can be a string (function name), anAddressValue (function address), or a CallsFromQuery with pattern matching options.
where
A Lua function used to filter callees. Receives aFunctionContext object and should return true for callees to include.
using
A Lua expression specifying how to annotate parameters and callees for dataflow analysis.parametersassigns annotations to the parameters of the function being analyzed. For example:parameters = {var:named "src", var:named "dst"}calleesassigns annotations to parameters and return values of functions called within the analyzed function. For examplecallees = { FunctionName = {output = ..., inputs = {...}} }
Do not use the same annotation name multiple times.
debug
If set totrue, enables debug logging for the matching process.
Example
The following example finds all callees ofprocess_request named target that also call malloc.
It annotates parameters and callees for dataflow tracking.