find_indirect_targets
Locates functions assigned to a function pointer field or variable and shows their call sites, revealing indirect invocation paths.
Instructions
Read-only. Find functions assigned to a function pointer field or variable.
Links assignment sites (driver.onData = &handler) to call
sites (driver.onData(buf, len)) via the field's USR.
Returns each function that could be invoked through the named function
pointer, showing both the assignment location and the call site(s).
When a function is assigned but no call site is found, call_file
and call_line are null — the assignment exists but the
invocation may be in unindexed code.
For the reverse query — where is this field or parameter called — use
find_indirect_call_sites.
Read-only. No side effects. Requires the reference index
(fw-context index — refs on by default).
Args:
name: Name of the function pointer field, variable, or parameter.
E.g. "onData" finds every function assigned to a field
named onData. Uses three-tier resolution.
project_root: Project root directory. Auto-detected if omitted.
limit: Maximum results (default 50, max 200).
Returns: list of dicts, each with: rhs_name (assigned function), rhs_qname, fn_ptr_type, method (assignment/call_arg/var_init/ init_list), assign_file, assign_line, assign_caller, call_file, call_line, call_expr_text.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the function pointer field, variable, or parameter. E.g. 'onData' — returns functions assigned to Driver::onData. | |
| limit | No | Maximum results (default 50, max 200). | |
| project_root | No | Project root. Auto-detected if omitted. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |