Source
pub fn writeStackTraceWindows(
out_stream: anytype,
debug_info: *SelfInfo,
tty_config: io.tty.Config,
context: *const windows.CONTEXT,
start_addr: ?usize,
) !void {
var addr_buf: [1024]usize = undefined;
const n = walkStackWindows(addr_buf[0..], context);
const addrs = addr_buf[0..n];
const start_i: usize = if (start_addr) |saddr| blk: {
for (addrs, 0..) |addr, i| {
if (addr == saddr) break :blk i;
}
return;
} else 0;
for (addrs[start_i..]) |addr| {
try printSourceAtAddress(debug_info, out_stream, addr - 1, tty_config);
}
}