pub struct BreakpointStop {
pub frames: CrashSnapshot,
pub span: (u32, u32),
pub hits: u64,
}Expand description
One :bp stop, as the host sees it.
Carries no context, no heap and no way back into the runtime — see the module header for why that absence is the point.
Handed to the handler by value, and it must not survive the call. The
GcRefs in frames name objects that are live at the
instant of the stop; the moment the handler returns, the program runs on and
the next allocation may collect any of them. Every other root set in the
system is registered with the collector, and this one deliberately is not —
the handler holds it for the length of one call, which is the whole window in
which no collection can happen (module header). A host that stashes it is
keeping a root set the collector cannot see.
Fields§
§frames: CrashSnapshotThe frame chain at the stop, innermost first: frame 0 is the function holding the marker, the last is the program’s entry point.
A CrashSnapshot because it is the same deep copy of the same debug
chain, produced by the same walk. Its
fault_kind is
FaultKind::None, which is the honest answer:
nothing went wrong, the program stopped because it was asked to.
span: (u32, u32)The :bp marker’s own source span [start, end), so the host can point
at the line the program stopped on rather than at the function’s extent.
hits: u64How many stops this run has made, counting this one. 1 on the first.
The host’s cheapest way to say “the tenth time round the loop” without keeping its own counter, and the runtime’s already: the count is what decides whether a stop is the first one, which is the only thing the runtime itself does with it.