Skip to main content
The CallsMatchingTable object represents the result of matching function call sites in a binary using dataflow analysis. It is returned by ProjectHandle:calls_matching and provides detailed information about each matched call site, including addresses, caller context, function inputs (arguments passed to the function), and output (the function return value).

Fields

FieldDescriptionType
call_addressAddress of the call site within the functionAddressValue
nameName of the caller functionstring
caller_addressAddress of the caller functionAddressValue
callerContext of the caller functionFunctionContext
inputsThe parameters passed to the called functionOperandInfo[]
outputThe output (return value) of the called functionOperandInfo
debugDebug logs for the matching processstring

Reference

call_address

The address of the call site.

name

The name of the caller function (the function containing the call site).

caller_address

The address of the function containing the call site.

caller

A FunctionContext object representing the function that contains the call site.

inputs

An array of OperandInfo objects representing an argument passed to the called function.

output

An OperandInfo object representing the return value of the called function.

debug

A string containing debug logs generated during the matching process.

Example

local results = project:calls_matching({
  to = "memcpy",
  using = {parameters = {var:named "src", var:named "dst"}}
})

for _, entry in ipairs(results) do
  print("Call to:", entry.name, "at address:", entry.call_address)
  print("Caller function:", entry.caller.name)
  print("Source argument annotation:", entry.inputs[1].annotation)
  print("Destination argument annotation:", entry.inputs[2].annotation)
  if entry.output then
    print("Return value annotation:", entry.output.annotation)
  end
  print("Debug log:", entry.debug)
end