pub struct FrameInfo {
pub source: String,
pub line: u32,
pub line_defined: u32,
}Expand description
One activation record projected from a live Vm.frames. Used by
frames_for_profile to feed the luna-profile sampler. Owned
strings so the caller can keep samples across dispatch ticks
without holding a &Vm borrow.
Fields§
§source: StringLua source / chunk name (Proto.source, decoded as UTF-8
lossy). Mirrors what debug.getinfo(level, "S").source
reports — minus the leading @/= PUC-style chunk prefix
is preserved verbatim.
line: u32Line number of the currently-dispatched instruction, derived
from Proto.lines[pc - 1]. 0 when the frame’s PC hasn’t
advanced past the entry yet (a freshly pushed frame mid-call
setup) — extremely rare from a Count hook, but tolerated.
line_defined: u32Proto.line_defined — the line the function’s function
keyword was on. Useful to differentiate two closures with
the same source but different definition lines.