Expand description
Debug-info resolution for happens-before anchors.
The anchor/edge model lives in detcore_model::happens_before; it leaves
func/file:line code locations unresolved (a Position::Rip with
addr: None). This module turns those human-legible locations into concrete
instruction pointers by reading the target binary’s symbol table (for
function entry addresses) and DWARF line program (for source lines), and
provides the reverse mapping (address → function/file/line) used by
introspection / --list-events.
It builds owned indices in a single pass and drops the mmap/DWARF context, so the resolver has no self-referential lifetimes and is cheap to keep around.
Structs§
- Debug
Info Resolver - Owned debug-info indices for one binary.
- HbLaunch
- How a run will execute the guest, as far as happens-before enforcement is
concerned (
refuse_unenforceable_anchors). - Resolved
Location - A resolved source location for introspection output.
Functions§
- describe_
anchor - Render one anchor for
--list-events-style introspection, showing the resolved address and source description when available. - load_
program - Load a happens-before specification from a JSON file and normalize it into a
HappensBeforeProgram. Code locations remain unresolved untilresolve_programruns against aDebugInfoResolver. - refuse_
hold_ without_ preemption - Refuse a version-2 program on a run without a preemption timer, saying
why (
reason). A version-2 spec bounds every hold bymax_hold_ns, charged in committed virtual time; without the timer a thread that spins without syscalls never ends its turn, committed time stops, and a hold could never be charged, so the run would hang instead of ending inHERMIT_HB_HOLD_BUDGET_EXCEEDED. Called before launch twice: for an explicit--max-timeslice disabled, and after argument validation, when the timer can also be lost because the host cannot arm it. A version-1 program has no budget and is never refused here. - refuse_
unenforceable_ anchors - Refuse, before anything is launched or any input is read, a program the run cannot enforce as written:
- resolve_
program - Resolve every anchor in
programwhose position is an unresolved RIP carrying a code location. Returns the names of anchors that could not be resolved.