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 {
13821382 } = .{ .address = address };
13831383 const CtxTy = @TypeOf(ctx);
13841384
1385 if (os.dl_iterate_phdr(&ctx, anyerror, struct {
1385 if (os.dl_iterate_phdr(&ctx, error{Found}, struct {
13861386 fn callback(info: *os.dl_phdr_info, size: usize, context: *CtxTy) !void {
13871387 _ = size;
13881388 // The base address is too high
......@@ -1410,7 +1410,6 @@ pub const DebugInfo = struct {
14101410 return error.MissingDebugInfo;
14111411 } else |err| switch (err) {
14121412 error.Found => {},
1413 else => return error.MissingDebugInfo,
14141413 }
14151414
14161415 if (self.address_map.get(ctx.base_address)) |obj_di| {