diff options
| author | kcbanner <kcbanner@gmail.com> | 2023-07-16 22:07:20 -0400 |
|---|---|---|
| committer | kcbanner <kcbanner@gmail.com> | 2023-07-20 22:58:16 -0400 |
| commit | 774dc2fdb75dc7f6b7e0bd2cfe947fffb9829ba1 (patch) | |
| tree | 84acdd4fe9fe07c1122ac15b5fb50f3dd6ba907c /test/standalone/stack_iterator/build.zig | |
| parent | bdb0a6fa77cc7eff7d03b022210328b24f9b6662 (diff) | |
| download | zig-774dc2fdb75dc7f6b7e0bd2cfe947fffb9829ba1.tar.gz zig-774dc2fdb75dc7f6b7e0bd2cfe947fffb9829ba1.zip | |
dwarf: add explicit_fde_offset to support more optimal __unwind_info dwarf lookups
Diffstat (limited to 'test/standalone/stack_iterator/build.zig')
| -rw-r--r-- | test/standalone/stack_iterator/build.zig | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/test/standalone/stack_iterator/build.zig b/test/standalone/stack_iterator/build.zig index 6a999aecff..f264777ae0 100644 --- a/test/standalone/stack_iterator/build.zig +++ b/test/standalone/stack_iterator/build.zig @@ -8,6 +8,14 @@ pub fn build(b: *std.Build) void { const optimize = b.standardOptimizeOption(.{}); // Unwinding pure zig code, with a frame pointer + // + // getcontext version: zig std + // + // Unwind info type: + // - ELF: DWARF .debug_frame + // - MachO: __unwind_info encodings: + // - x86_64: RBP_FRAME + // - aarch64: FRAME, DWARF { const exe = b.addExecutable(.{ .name = "zig_unwind_fp", @@ -23,7 +31,15 @@ pub fn build(b: *std.Build) void { test_step.dependOn(&run_cmd.step); } - // Unwinding pure zig code, without a frame pointer + // Unwinding pure zig code, without a frame pointer. + // + // getcontext version: zig std + // + // Unwind info type: + // - ELF: DWARF .eh_frame_hdr + .eh_frame + // - MachO: __unwind_info encodings: + // - x86_64: STACK_IMMD, STACK_IND + // - aarch64: FRAMELESS, DWARF { const exe = b.addExecutable(.{ .name = "zig_unwind_nofp", @@ -34,12 +50,21 @@ pub fn build(b: *std.Build) void { if (target.isDarwin()) exe.unwind_tables = true; exe.omit_frame_pointer = true; + exe.unwind_tables = true; const run_cmd = b.addRunArtifact(exe); test_step.dependOn(&run_cmd.step); } // Unwinding through a C shared library without a frame pointer (libc) + // + // getcontext version: libc + // + // Unwind info type: + // - ELF: DWARF .eh_frame + .debug_frame + // - MachO: __unwind_info encodings: + // - x86_64: STACK_IMMD, STACK_IND + // - aarch64: FRAMELESS, DWARF { const c_shared_lib = b.addSharedLibrary(.{ .name = "c_shared_lib", |
