[nix-shell:~/dev/zig/build-release]$ gdb ./test GNU gdb (GDB) 8.3.1 Copyright (C) 2019 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-unknown-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./test... (gdb) break _start Breakpoint 1 at 0x800000b: file test.zig, line 2. (gdb) run Starting program: /home/andy/dev/zig/build-release/test Breakpoint 1, _start () at test.zig:2 2 assert(add(3, 4) == 7); (gdb) step add () at test.zig:9 9 var x: u32 = undefined; (gdb) 10 x = 0; (gdb) 11 x += a; (gdb) p x No symbol "x" in current context. (gdb) step 12 x += b; (gdb) 13 return x; (gdb) assert () at test.zig:17 17 if (!ok) unreachable; // assertion failure (gdb) _start () at test.zig:3 3 assert(add(20, 10) == 30); (gdb) add () at test.zig:9 9 var x: u32 = undefined; (gdb) 10 x = 0; (gdb) 11 x += a; (gdb) 12 x += b; (gdb) 13 return x; (gdb) assert () at test.zig:17 17 if (!ok) unreachable; // assertion failure (gdb) _start () at test.zig:5 5 exit(); (gdb) exit () at test.zig:21 21 asm volatile ("syscall" (gdb) [Inferior 1 (process 423) exited normally] (gdb) quit