Skip to content

v0.20.1 — fix indirect call detection for array subscript expressions

Choose a tag to compare

@turbyho turbyho released this 13 Jul 15:02
v0.20.1

Overview

Patch release fixing find_indirect_call_sites for array-subscript
function pointer calls — the primary dispatch pattern in embedded
firmware (ISR vector tables, callback arrays, state machine dispatch).
Also surfaces indirect call sites in get_symbol_context for function
and method symbols.

Changes

Fixes

  • Array subscript indirect call detectionhandlers[irq](arg),
    obj->callbacks[idx](args), and similar patterns are now detected as
    indirect call sites. Previously cursor.referenced was None for
    ArraySubscriptExpr callees, so the call site was silently missed.
  • get_symbol_context for functionsindirect_call_sites field is
    now populated for function and method symbols (via from_usr
    query), not only for field and variable symbols.
File Change
src/fw_context_mcp/indexer/symbols.py _first_child_unwrapped helper + ArraySubscriptExpr fallback in indirect call site extraction
src/fw_context_mcp/mcp/handlers/source.py from_usr query for function/method indirect call sites in get_symbol_context
tests/test_db.py 4 tests: array subscript, struct array member, no false positives, member access regression

Breaking changes

None.