diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-05-01 23:17:15 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-05-01 23:17:28 -0400 |
| commit | 45bce27b8fecda4fba1c22dd191030af29ccbc6f (patch) | |
| tree | 946b5080cbe75dd1ef150ac830522a1ce40c526b /lib/std/debug.zig | |
| parent | 988031c07c1959b05682f007ed3bc848a75a43d0 (diff) | |
| download | zig-45bce27b8fecda4fba1c22dd191030af29ccbc6f.tar.gz zig-45bce27b8fecda4fba1c22dd191030af29ccbc6f.zip | |
cleanup and fixes. behavior tests passing with evented I/O
Diffstat (limited to 'lib/std/debug.zig')
| -rw-r--r-- | lib/std/debug.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/debug.zig b/lib/std/debug.zig index d3497b4dc8..97aa2b6e97 100644 --- a/lib/std/debug.zig +++ b/lib/std/debug.zig @@ -667,7 +667,7 @@ pub fn openSelfDebugInfo(allocator: *mem.Allocator) anyerror!DebugInfo { /// TODO resources https://github.com/ziglang/zig/issues/4353 fn openCoffDebugInfo(allocator: *mem.Allocator, coff_file_path: [:0]const u16) !ModuleDebugInfo { noasync { - const coff_file = try std.fs.openFileAbsoluteW(coff_file_path.ptr, .{}); + const coff_file = try std.fs.openFileAbsoluteW(coff_file_path, .{ .intended_io_mode = .blocking }); errdefer coff_file.close(); const coff_obj = try allocator.create(coff.Coff); @@ -1003,7 +1003,7 @@ fn openMachODebugInfo(allocator: *mem.Allocator, macho_file_path: []const u8) !M fn printLineFromFileAnyOs(out_stream: var, line_info: LineInfo) !void { // Need this to always block even in async I/O mode, because this could potentially // be called from e.g. the event loop code crashing. - var f = try fs.cwd().openFile(line_info.file_name, .{ .always_blocking = true }); + var f = try fs.cwd().openFile(line_info.file_name, .{ .intended_io_mode = .blocking }); defer f.close(); // TODO fstat and make sure that the file has the correct size @@ -1051,7 +1051,7 @@ const MachoSymbol = struct { fn mapWholeFile(path: []const u8) ![]align(mem.page_size) const u8 { noasync { - const file = try fs.cwd().openFile(path, .{ .always_blocking = true }); + const file = try fs.cwd().openFile(path, .{ .intended_io_mode = .blocking }); defer file.close(); const file_len = try math.cast(usize, try file.getEndPos()); |
