diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-08-17 12:14:30 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-17 12:14:30 -0700 |
| commit | 5ae5dc507b10116f90f1e1491d70566f99ac0981 (patch) | |
| tree | 013f2a9106ac57c0be4d9c698e201e5f619e5bbf /lib/std/debug.zig | |
| parent | f3f554b9b89cc39cf00b4df68bd3455e8ef34984 (diff) | |
| parent | e288c546996d202e87168f25d689a2f21fe03b60 (diff) | |
| download | zig-5ae5dc507b10116f90f1e1491d70566f99ac0981.tar.gz zig-5ae5dc507b10116f90f1e1491d70566f99ac0981.zip | |
Merge pull request #16824 from mikdusan/bsd
de-bitrot the BSDs
Diffstat (limited to 'lib/std/debug.zig')
| -rw-r--r-- | lib/std/debug.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/std/debug.zig b/lib/std/debug.zig index 3296f8190a..6de21ddd1b 100644 --- a/lib/std/debug.zig +++ b/lib/std/debug.zig @@ -168,6 +168,7 @@ pub fn relocateContext(context: *ThreadContext) void { } pub const have_getcontext = @hasDecl(os.system, "getcontext") and + builtin.os.tag != .openbsd and (builtin.os.tag != .linux or switch (builtin.cpu.arch) { .x86, .x86_64, @@ -1228,7 +1229,7 @@ pub fn readElfDebugInfo( } var cwd_buf: [fs.MAX_PATH_BYTES]u8 = undefined; - const cwd_path = fs.cwd().realpath("", &cwd_buf) catch break :blk; + const cwd_path = os.realpath(".", &cwd_buf) catch break :blk; // <global debug directory>/<absolute folder of current binary>/<gnu_debuglink> for (global_debug_directories) |global_directory| { |
