Fix stack-trace address calculation on Windows

Let's always subtract 1 from the return address so that we're sure to be
inside the callee.

Fixes some edge case where the stack trace skipped the first entry.
This commit is contained in:
LemonBoy 2020-01-27 13:12:01 +01:00
parent f8e015c85f
commit 7336b750bd

View File

@ -360,7 +360,7 @@ pub fn writeCurrentStackTraceWindows(
return;
} else 0;
for (addrs[start_i..]) |addr| {
try printSourceAtAddress(debug_info, out_stream, addr, tty_config);
try printSourceAtAddress(debug_info, out_stream, addr - 1, tty_config);
}
}