find_indirect_call_sites
Locate all indirect function pointer invocations by field or variable name. Returns each call site's file, line, callee expression, and enclosing function for tracing dispatch paths.
Instructions
Find indirect call sites where a function pointer field or variable is invoked.
Returns locations where a function pointer is called through a field
access (driver.onData(buf, len)) or variable dereference
(stored_callback(42)).
Read-only. No side effects. Use this to answer "where is this function
pointer invoked?" as opposed to find_callers which answers "who
calls this function?" and find_references which answers "where is
this symbol read or assigned?"
For the reverse query — which functions are assigned to a given field
or parameter — use find_indirect_targets.
Requires the reference index (fw-context index — refs on by default).
Args:
name: Name of the function pointer field or variable.
E.g. "onData" finds every call through a field named
onData. Uses three-tier resolution: exact name, exact
qualified, suffix LIKE.
project_root: Project root directory. Auto-detected if omitted.
limit: Maximum results (default 50, max 200).
Returns:
list of dicts, each with: file, line, expr_text (the callee
expression, e.g. "driver.onData"), target_usr, target_name,
fn_ptr_type (the function pointer type signature), caller
(enclosing function name), caller_kind.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the function pointer field or variable to find call sites of. E.g. 'onData' finds all calls through Driver::onData. | |
| limit | No | Maximum results (default 50). | |
| project_root | No | Project root directory. Auto-detected if omitted. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |