Created
December 22, 2022 20:48
-
-
Save mikdusan/089521d342f5a6417f883966fd0f2220 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
pub fn main() !void { | |
try one(); | |
} | |
fn one() !void { | |
try two(); | |
} | |
fn two() !void { | |
try three(); | |
} | |
fn three() !void { | |
var a: []const u8 = "hello"; | |
_ = a[0]; | |
unreachable; | |
// @breakpoint(); | |
//return error.WHUT; | |
} |
Author
mikdusan
commented
Dec 22, 2022
Thread 1 "main" received signal SIGABRT, Aborted.
0x0000000000238d42 in os.linux.x86_64.syscall4 (number=rt_sigprocmask, arg1=2, arg2=140737488347680, arg3=0, arg4=8) at /home/mike/project/zig/work/main/lib/std/os/linux/x86_64.zig:57
57 return asm volatile ("syscall"
(gdb) bt
#0 0x0000000000238d42 in os.linux.x86_64.syscall4 (number=rt_sigprocmask, arg1=2, arg2=140737488347680, arg3=0, arg4=8)
at /home/mike/project/zig/work/main/lib/std/os/linux/x86_64.zig:57
#1 0x00000000002304bd in os.linux.sigprocmask (flags=2, set=0x7fffffffe220, oldset=0x0) at /home/mike/project/zig/work/main/lib/std/os/linux.zig:1135
#2 0x000000000020e6b8 in os.sigprocmask (flags=2, set=0x7fffffffe220, oldset=0x0) at /home/mike/project/zig/work/main/lib/std/os.zig:5405
#3 0x000000000020e624 in os.raise (sig=6 '\006') at /home/mike/project/zig/work/main/lib/std/os.zig:585
#4 0x000000000020ba5f in os.abort () at /home/mike/project/zig/work/main/lib/std/os.zig:516
#5 0x000000000020b03d in debug.panicImpl (trace=0x0, first_trace_addr=..., msg=...) at /home/mike/project/zig/work/main/lib/std/debug.zig:391
#6 0x000000000020a49a in builtin.default_panic (msg=..., error_return_trace=0x0, ret_addr=...) at /home/mike/project/zig/work/main/lib/std/builtin.zig:909
#7 0x000000000020b09c in main.three () at main.zig:18
#8 0x000000000020b0a9 in main.two () at main.zig:12
#9 0x000000000020b0b9 in main.one () at main.zig:8
#10 0x000000000020b0c9 in main.main () at main.zig:4
(gdb) quit
A debugging session is active.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment