diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-12 13:19:32 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-13 00:41:47 -0300 |
| commit | 4b4113a0217ee27c78e7efddb66ff5a455d49083 (patch) | |
| tree | b848dc1e92c3126dec11da8547e8033ff3990140 /build/debugger.zig | |
| parent | eab50d1c040774351f332a1568fa332c377860bd (diff) | |
| download | computeranim-4b4113a0217ee27c78e7efddb66ff5a455d49083.tar.gz computeranim-4b4113a0217ee27c78e7efddb66ff5a455d49083.zip | |
debugger: add a native GUI with live V8 JIT debugging
Diffstat (limited to 'build/debugger.zig')
| -rw-r--r-- | build/debugger.zig | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/build/debugger.zig b/build/debugger.zig index f0b0e7c..af6e2e0 100644 --- a/build/debugger.zig +++ b/build/debugger.zig @@ -9,6 +9,8 @@ pub fn add(ctx: Ctx) void { // Position-independent, so the load bias is exercised. const fib = ctx.cTarget("fib", &.{"fib.c"}); fib.pie = true; + const no_lines = b.addExecutable(.{ .name = "fib-nolines", .root_module = b.createModule(.{ .target = ctx.target, .optimize = .Debug, .link_libc = true, .sanitize_c = .off }) }); + no_lines.root_module.addCSourceFile(.{ .file = b.path("targets/fib.c"), .flags = &.{ "-O0", "-g0" } }); const list = ctx.cTarget("list", &.{"list.c"}); const threads = ctx.cTarget("threads", &.{"threads.c"}); const libc_glibc = ctx.cTarget("libc-glibc", &.{"libc.c"}); @@ -51,6 +53,7 @@ pub fn add(ctx: Ctx) void { // The library, driven from Zig: the targets' paths come as options. const paths = b.addOptions(); + paths.addOptionPath("fib_nolines", no_lines.getEmittedBin()); for (targets) |t| paths.addOptionPath(b.dupe(std.mem.replaceOwned(u8, b.allocator, t.name, "-", "_") catch @panic("OOM")), t.getEmittedBin()); const lib_tests = b.addTest(.{ .root_module = b.createModule(.{ .root_source_file = b.path("src/trace/debugger_test.zig"), @@ -174,7 +177,7 @@ pub fn add(ctx: Ctx) void { until.addArg("10"); until.expectStdErrMatch("ended at fib, as --until asked"); const until_show = b.addRunArtifact(ctx.exe); - until_show.addArgs(&.{ "show" }); + until_show.addArgs(&.{"show"}); until_show.addFileArg(until_recording); until_show.addArg("-1"); // WHERE resolves as -b's does: a function's place past its prologue. |
