authorgravatar for r00ster91@proton.meWooster <r00ster91@proton.me> 2022-10-31 19:43:41+01:00
committergravatar for r00ster91@proton.meWooster <r00ster91@proton.me> 2022-12-13 09:11:30+01:00
log7561f63b5d93fb32b39410590625bb16bf2ac0dd
tree1f3323f8654227d2b0b23ef677aa4342cbd0b867
parentd0d845a25b897a8db37b0f60d5ec313f6b56943f

std.debug: use OpenSelfDebugInfoError


1 files changed, 2 insertions(+), 4 deletions(-)

lib/std/debug.zig+2-4
......@@ -761,14 +761,12 @@ fn printLineInfo(
761761 }
762762}
763763
764// TODO use this
765764pub const OpenSelfDebugInfoError = error{
766765 MissingDebugInfo,
767 OutOfMemory,
768766 UnsupportedOperatingSystem,
769767};
770768
771pub fn openSelfDebugInfo(allocator: mem.Allocator) anyerror!DebugInfo {
769pub fn openSelfDebugInfo(allocator: mem.Allocator) OpenSelfDebugInfoError!DebugInfo {
772770 nosuspend {
773771 if (builtin.strip_debug_info)
774772 return error.MissingDebugInfo;
......@@ -785,7 +783,7 @@ pub fn openSelfDebugInfo(allocator: mem.Allocator) anyerror!DebugInfo {
785783 .windows,
786784 .solaris,
787785 => return DebugInfo.init(allocator),
788 else => return error.UnsupportedDebugInfo,
786 else => return error.UnsupportedOperatingSystem,
789787 }
790788 }
791789}