aboutsummaryrefslogtreecommitdiff
path: root/lib/std/debug.zig
diff options
context:
space:
mode:
authorMeghan <hello@nektro.net>2022-10-16 12:44:30 -0700
committerVeikka Tuominen <git@vexu.eu>2022-10-18 13:03:49 +0200
commit759f72fcfe56ec103d9bb93c2423e37fe3ba1162 (patch)
tree26cef4dd4e9eaf38a53654930e401441db66dbed /lib/std/debug.zig
parent23e212a9d0b5cfdff991a40ca264f9d1284f0d5f (diff)
downloadzig-759f72fcfe56ec103d9bb93c2423e37fe3ba1162.tar.gz
zig-759f72fcfe56ec103d9bb93c2423e37fe3ba1162.zip
std.debug: define error set in DebugInfo.lookupModuleDl
Diffstat (limited to 'lib/std/debug.zig')
-rw-r--r--lib/std/debug.zig3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/std/debug.zig b/lib/std/debug.zig
index 245e164489..4511f6baaa 100644
--- a/lib/std/debug.zig
+++ b/lib/std/debug.zig
@@ -1382,7 +1382,7 @@ pub const DebugInfo = struct {
} = .{ .address = address };
const CtxTy = @TypeOf(ctx);
- if (os.dl_iterate_phdr(&ctx, anyerror, struct {
+ if (os.dl_iterate_phdr(&ctx, error{Found}, struct {
fn callback(info: *os.dl_phdr_info, size: usize, context: *CtxTy) !void {
_ = size;
// The base address is too high
@@ -1410,7 +1410,6 @@ pub const DebugInfo = struct {
return error.MissingDebugInfo;
} else |err| switch (err) {
error.Found => {},
- else => return error.MissingDebugInfo,
}
if (self.address_map.get(ctx.base_address)) |obj_di| {