aboutsummaryrefslogtreecommitdiff
path: root/lib/std/debug.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-06-08 16:33:35 -0400
committerAndrew Kelley <andrew@ziglang.org>2020-06-08 16:33:35 -0400
commit05d284c842a5ba21cd836c2b212daa24227a9177 (patch)
tree52875921e0d3c6efab2c88a38f4d5b512386de3c /lib/std/debug.zig
parent47090d234ecc3e50937c918b05e6f039a53d880c (diff)
downloadzig-05d284c842a5ba21cd836c2b212daa24227a9177.tar.gz
zig-05d284c842a5ba21cd836c2b212daa24227a9177.zip
update sort callsite to new API
Diffstat (limited to 'lib/std/debug.zig')
-rw-r--r--lib/std/debug.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/debug.zig b/lib/std/debug.zig
index 0e234ab419..d0cdf6f4f5 100644
--- a/lib/std/debug.zig
+++ b/lib/std/debug.zig
@@ -1003,7 +1003,7 @@ fn readMachODebugInfo(allocator: *mem.Allocator, macho_file: File) !ModuleDebugI
// Even though lld emits symbols in ascending order, this debug code
// should work for programs linked in any valid way.
// This sort is so that we can binary search later.
- std.sort.sort(MachoSymbol, symbols, MachoSymbol.addressLessThan);
+ std.sort.sort(MachoSymbol, symbols, {}, MachoSymbol.addressLessThan);
return ModuleDebugInfo{
.base_address = undefined,
@@ -1058,7 +1058,7 @@ const MachoSymbol = struct {
return self.nlist.n_value;
}
- fn addressLessThan(lhs: MachoSymbol, rhs: MachoSymbol) bool {
+ fn addressLessThan(context: void, lhs: MachoSymbol, rhs: MachoSymbol) bool {
return lhs.address() < rhs.address();
}
};
@@ -1300,7 +1300,7 @@ pub const DebugInfo = struct {
fs.cwd().openFile(ctx.name, .{ .intended_io_mode = .blocking })
else
fs.openSelfExe(.{ .intended_io_mode = .blocking });
-
+
const elf_file = copy catch |err| switch (err) {
error.FileNotFound => return error.MissingDebugInfo,
else => return err,