pub fn next(unwinder: *SelfUnwinder, gpa: Allocator, cache_entry: *const CacheEntry) std.debug.SelfInfoError!usize {
return unwinder.nextInner(gpa, cache_entry) catch |err| switch (err) {
error.OutOfMemory,
error.InvalidDebugInfo,
=> |e| return e,
error.UnsupportedRegister,
error.UnimplementedExpressionCall,
error.UnimplementedOpcode,
error.UnimplementedUserOpcode,
error.UnimplementedTypedComparison,
error.UnimplementedTypeConversion,
error.UnknownExpressionOpcode,
=> return error.UnsupportedDebugInfo,
error.ReadFailed,
error.EndOfStream,
error.Overflow,
error.IncompatibleRegisterSize,
error.InvalidRegister,
error.IncompleteExpressionContext,
error.InvalidCFAOpcode,
error.InvalidExpression,
error.InvalidFrameBase,
error.InvalidIntegralTypeSize,
error.InvalidSubExpression,
error.InvalidTypeLength,
error.TruncatedIntegralType,
error.DivisionByZero,
=> return error.InvalidDebugInfo,
};
}
Applies the register rules given in
cache_entryto the current state ofunwinder. The caller is responsible for ensuring thatcache_entrycontains the correct rule set forunwinder.pc.unwinder.cpu_stateandunwinder.pcare updated to refer to the next frame, and this frame's return address is returned as ausize.