Skip to main content

Module collectors

Module collectors 

Source
Expand description

On-demand collectors.

These populate the cross-track shared tables (disassembly, source_snapshots, alloc_sites) in response to a specific agent question — dbg disasm <sym>, dbg source <sym>, etc. They’re lightweight: cheap enough to run mid-debug at a breakpoint.

Wiring:

  • A collector may have access to the live debugger session via LiveDebugger. Collectors that can reuse the existing PTY do so (lldb’s disassemble runs cleanly inside an active session); collectors that need a fresh process (.NET jitdasm, which must set DOTNET_JitDisasm before the runtime starts) always spawn one — never restarting the live debug session.
  • Results are deduplicated on (symbol_id, source, tier) unless CollectCtx::refresh = true is set.

Modules§

disasm
Three disasm collectors for Phase 1: lldb (native), jitdasm (.NET), go-objdump (Go).

Structs§

CollectCtx
Context passed to every collector invocation.
DisasmOutput
The output of a disasm collector, before it’s written to the DB. Separated so tests can exercise the shell-out + parse path without an actual SessionDb attached.

Enums§

CollectTrigger
What drove this collection — informational, stored on the row so agents can see whether disasm was requested at a stop point, drilled into from a hotspot, or asked for explicitly.

Traits§

LiveDebugger
A minimal handle the daemon passes to collectors so they can issue commands on the live debugger session when useful. None when the collector is invoked from a profile-only context (no live PTY).
OnDemandCollector
The on-demand collector trait.

Functions§

persist_disasm
Write a DisasmOutput into the disassembly table, keyed to the canonicalized symbol. Respects ctx.refresh — returns the existing row’s id when a match is found and refresh is off.