diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-02-25 16:00:00 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-25 16:00:00 -0800 |
| commit | 7edb204edfa41e11776ac009da5a20fb1c907f5f (patch) | |
| tree | 9c6eae297ebc492c0a1a94a4d3d25fc3bcd07bd9 /lib/std/debug.zig | |
| parent | 297eabd4accbcae42bfe821078a79e4af06a2dde (diff) | |
| parent | 37a1d08de2ce263439713180f57741d16fb27e23 (diff) | |
| download | zig-7edb204edfa41e11776ac009da5a20fb1c907f5f.tar.gz zig-7edb204edfa41e11776ac009da5a20fb1c907f5f.zip | |
Merge pull request #7546 from hoanga/haiku-support
initial support for haiku
Diffstat (limited to 'lib/std/debug.zig')
| -rw-r--r-- | lib/std/debug.zig | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/std/debug.zig b/lib/std/debug.zig index a434fe0e8b..f32c1a6156 100644 --- a/lib/std/debug.zig +++ b/lib/std/debug.zig @@ -1125,12 +1125,15 @@ pub const DebugInfo = struct { } pub fn getModuleForAddress(self: *DebugInfo, address: usize) !*ModuleDebugInfo { - if (comptime std.Target.current.isDarwin()) - return self.lookupModuleDyld(address) - else if (builtin.os.tag == .windows) - return self.lookupModuleWin32(address) - else + if (comptime std.Target.current.isDarwin()) { + return self.lookupModuleDyld(address); + } else if (builtin.os.tag == .windows) { + return self.lookupModuleWin32(address); + } else if (builtin.os.tag == .haiku) { + return self.lookupModuleHaiku(address); + } else { return self.lookupModuleDl(address); + } } fn lookupModuleDyld(self: *DebugInfo, address: usize) !*ModuleDebugInfo { @@ -1336,6 +1339,10 @@ pub const DebugInfo = struct { return obj_di; } + + fn lookupModuleHaiku(self: *DebugInfo, address: usize) !*ModuleDebugInfo { + @panic("TODO implement lookup module for Haiku"); + } }; const SymbolInfo = struct { |
