authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2022-10-16 12:44:30-07:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-10-18 13:03:49+02:00
log759f72fcfe56ec103d9bb93c2423e37fe3ba1162
tree26cef4dd4e9eaf38a53654930e401441db66dbed
parent23e212a9d0b5cfdff991a40ca264f9d1284f0d5f

std.debug: define error set in DebugInfo.lookupModuleDl


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

lib/std/debug.zig+1-2
...@@ -1382,7 +1382,7 @@ pub const DebugInfo = struct {...@@ -1382,7 +1382,7 @@ pub const DebugInfo = struct {
1382 } = .{ .address = address };1382 } = .{ .address = address };
1383 const CtxTy = @TypeOf(ctx);1383 const CtxTy = @TypeOf(ctx);
13841384
1385 if (os.dl_iterate_phdr(&ctx, anyerror, struct {1385 if (os.dl_iterate_phdr(&ctx, error{Found}, struct {
1386 fn callback(info: *os.dl_phdr_info, size: usize, context: *CtxTy) !void {1386 fn callback(info: *os.dl_phdr_info, size: usize, context: *CtxTy) !void {
1387 _ = size;1387 _ = size;
1388 // The base address is too high1388 // The base address is too high
...@@ -1410,7 +1410,6 @@ pub const DebugInfo = struct {...@@ -1410,7 +1410,6 @@ pub const DebugInfo = struct {
1410 return error.MissingDebugInfo;1410 return error.MissingDebugInfo;
1411 } else |err| switch (err) {1411 } else |err| switch (err) {
1412 error.Found => {},1412 error.Found => {},
1413 else => return error.MissingDebugInfo,
1414 }1413 }
14151414
1416 if (self.address_map.get(ctx.base_address)) |obj_di| {1415 if (self.address_map.get(ctx.base_address)) |obj_di| {