feat: more improvements to panic handling
Follow on panics no longer confuse the panic output and the just in time debugger now works properly on the local tty.
This commit is contained in:
parent
14dce0a10b
commit
e9735d9425
5 changed files with 42 additions and 12 deletions
|
@ -1380,7 +1380,7 @@ pub fn attachSegfaultHandler() void {
|
|||
updateSegfaultHandler(&act);
|
||||
}
|
||||
|
||||
fn resetSegfaultHandler() void {
|
||||
pub fn resetSegfaultHandler() void {
|
||||
if (native_os == .windows) {
|
||||
if (windows_segfault_handle) |handle| {
|
||||
assert(windows.kernel32.RemoveVectoredExceptionHandler(handle) != 0);
|
||||
|
@ -1438,7 +1438,7 @@ pub fn handleSegfaultPosix(sig: i32, info: *const posix.siginfo_t, ctx_ptr: ?*an
|
|||
posix.abort();
|
||||
}
|
||||
|
||||
fn dumpSegfaultInfoPosix(sig: i32, code: i32, addr: usize, ctx_ptr: ?*anyopaque) void {
|
||||
pub fn dumpSegfaultInfoPosix(sig: i32, code: i32, addr: usize, ctx_ptr: ?*anyopaque) void {
|
||||
const stderr = io.getStdErr().writer();
|
||||
_ = switch (sig) {
|
||||
posix.SIG.SEGV => if (native_arch == .x86_64 and native_os == .linux and code == 128) // SI_KERNEL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue