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(...@@ -761,14 +761,12 @@ fn printLineInfo(
761 }761 }
762}762}
763763
764// TODO use this
765pub const OpenSelfDebugInfoError = error{764pub const OpenSelfDebugInfoError = error{
766 MissingDebugInfo,765 MissingDebugInfo,
767 OutOfMemory,
768 UnsupportedOperatingSystem,766 UnsupportedOperatingSystem,
769};767};
770768
771pub fn openSelfDebugInfo(allocator: mem.Allocator) anyerror!DebugInfo {769pub fn openSelfDebugInfo(allocator: mem.Allocator) OpenSelfDebugInfoError!DebugInfo {
772 nosuspend {770 nosuspend {
773 if (builtin.strip_debug_info)771 if (builtin.strip_debug_info)
774 return error.MissingDebugInfo;772 return error.MissingDebugInfo;
...@@ -785,7 +783,7 @@ pub fn openSelfDebugInfo(allocator: mem.Allocator) anyerror!DebugInfo {...@@ -785,7 +783,7 @@ pub fn openSelfDebugInfo(allocator: mem.Allocator) anyerror!DebugInfo {
785 .windows,783 .windows,
786 .solaris,784 .solaris,
787 => return DebugInfo.init(allocator),785 => return DebugInfo.init(allocator),
788 else => return error.UnsupportedDebugInfo,786 else => return error.UnsupportedOperatingSystem,
789 }787 }
790 }788 }
791}789}