find_call_path
Find call paths between two C/C++ functions using BFS on the libclang call graph. Returns up to 5 shortest paths with depth and chain, resolving function pointers and ISR vectors.
Instructions
Find call paths between two C/C++ functions via BFS in the libclang call graph, including function-pointer edges and ISR vector registrations. libclang-powered: follows function-pointer edges and ISR vector registrations that text-based search cannot resolve.
Use to answer "how does A reach B?" — e.g. tracing how a high-level
event handler eventually calls a low-level driver. Returns up to 5
shortest paths, each with depth (edge count) and chain
(e.g. "main → app_run → modem_init").
For one-sided exploration use find_all_callers_recursive (who reaches
this?) or find_callees_recursive (what does this reach?).
For exact call-graph verification use find_callers or
find_references.
Read-only. No side effects. Requires both symbols to be in the index
and refs enabled (fw-context index — refs on by default).
Args: from_name: Starting symbol for path search. to_name: Target symbol to find path to. project_root: Project root. Auto-detected if omitted. max_depth: Maximum BFS depth for path search (default 10).
Returns:
list of dicts, each with: depth (edge count, int), chain (str —
e.g. "main → app_run → modem_init"). Empty list when no
path exists within the depth limit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to_name | Yes | Target symbol to find path to. | |
| from_name | Yes | Starting symbol for path search. | |
| max_depth | No | Maximum BFS depth for path search (default 10). | |
| project_root | No | Project root. Auto-detected if omitted. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |