aboutsummaryrefslogtreecommitdiff
path: root/lib/std/debug.zig
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std/debug.zig')
-rw-r--r--lib/std/debug.zig6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/std/debug.zig b/lib/std/debug.zig
index 711f728fa6..e31f847d79 100644
--- a/lib/std/debug.zig
+++ b/lib/std/debug.zig
@@ -796,6 +796,9 @@ pub const OpenSelfDebugInfoError = error{
pub fn openSelfDebugInfo(allocator: *mem.Allocator) !DebugInfo {
if (builtin.strip_debug_info)
return error.MissingDebugInfo;
+ if (@hasDecl(root, "os") and @hasDecl(root.os, "debug") and @hasDecl(root.os.debug, "openSelfDebugInfo")) {
+ return noasync root.os.debug.openSelfDebugInfo(allocator);
+ }
if (builtin.os == .windows) {
return noasync openSelfDebugInfoWindows(allocator);
}
@@ -1722,8 +1725,7 @@ pub const DebugInfo = switch (builtin.os) {
sect_contribs: []pdb.SectionContribEntry,
modules: []Module,
},
- .linux, .freebsd, .netbsd, .dragonfly => DwarfInfo,
- else => @compileError("Unsupported OS"),
+ else => DwarfInfo,
};
const PcRange = struct {