From 4765294ca4bd7dd54207892b199f3053702d9a2a Mon Sep 17 00:00:00 2001 From: Jacob Young Date: Wed, 19 Oct 2022 07:56:02 -0400 Subject: cbe: get enough things working to support basic programs * Enable advanced start support. * Enable advanced test_runner support. * Zig Language Reference's Hello World now works. --- lib/std/debug.zig | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/std/debug.zig') diff --git a/lib/std/debug.zig b/lib/std/debug.zig index 21b05249a1..de7aa07b8b 100644 --- a/lib/std/debug.zig +++ b/lib/std/debug.zig @@ -1222,7 +1222,13 @@ pub const DebugInfo = struct { } pub fn getModuleForAddress(self: *DebugInfo, address: usize) !*ModuleDebugInfo { - if (comptime builtin.target.isDarwin()) { + if (builtin.zig_backend == .stage2_c) { + return @as(error{ + InvalidDebugInfo, + MissingDebugInfo, + UnsupportedBackend, + }, error.UnsupportedBackend); + } else if (comptime builtin.target.isDarwin()) { return self.lookupModuleDyld(address); } else if (native_os == .windows) { return self.lookupModuleWin32(address); -- cgit v1.2.3