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’sdisassembleruns cleanly inside an active session); collectors that need a fresh process (.NET jitdasm, which must setDOTNET_JitDisasmbefore the runtime starts) always spawn one — never restarting the live debug session. - Results are deduplicated on
(symbol_id, source, tier)unlessCollectCtx::refresh = trueis set.
Modules§
- disasm
- Three disasm collectors for Phase 1: lldb (native), jitdasm (.NET), go-objdump (Go).
Structs§
- Collect
Ctx - Context passed to every collector invocation.
- Disasm
Output - 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§
- Collect
Trigger - 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§
- Live
Debugger - 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).
- OnDemand
Collector - The on-demand collector trait.
Functions§
- persist_
disasm - Write a
DisasmOutputinto thedisassemblytable, keyed to the canonicalized symbol. Respectsctx.refresh— returns the existing row’s id when a match is found and refresh is off.