Stream: SIG-Debugging

Topic: separating debuginfo and binary


view this post on Zulip Yoshua Wuyts (Oct 30 2024 at 14:01):

Heya! I was wondering whether DWARF support for Wasm allows separating the debuginfo from the main binary?

view this post on Zulip Yoshua Wuyts (Oct 30 2024 at 14:03):

I know it's possible with ELF binaries, but I wasn't sure whether we can do it for Wasm too? I assume the answer is: "theoretically yes." - but does e.g. Wasmtime support that too?

view this post on Zulip Yoshua Wuyts (Oct 30 2024 at 14:04):

not asking we implement this - just trying to understand the current state of things

view this post on Zulip Alex Crichton (Oct 30 2024 at 14:50):

There's some support for *.dwp in Wasmtime, although I don't actually know how one produces a binary with a *.dwp file or if you extract it from it afterwards

view this post on Zulip Yoshua Wuyts (Oct 30 2024 at 15:11):

oh neat! ty!

view this post on Zulip Yoshua Wuyts (Oct 30 2024 at 15:11):

that's more than I expected ^^

view this post on Zulip Yoshua Wuyts (Oct 30 2024 at 15:12):

what I'm wondering is whether it would be possible, or even beneficial to split the debuginfo from the main Wasm binary in the OCI representation on registries

view this post on Zulip Yoshua Wuyts (Oct 30 2024 at 15:14):

currently looking into that for e.g. SBOM data - and it seemed like package provenance data is kind of similar to debuginfo in its purpose

view this post on Zulip Yoshua Wuyts (Oct 30 2024 at 15:14):

e.g. allows us to recover information that was present in the source info, but is lost after compilation

view this post on Zulip Yoshua Wuyts (Oct 30 2024 at 15:15):

anyway, context for why I was wondering about this ^^

view this post on Zulip Alex Crichton (Oct 30 2024 at 15:22):

I suspect it'd definitely make sense yeah, although the exact specifics would probably require someone with more knowledge of what a *.dwp is than I, but I could imagine that the wasm could be one layer and the debuginfo another layer and packaging could automatically split the two if it were merged together

view this post on Zulip Ralph (Oct 30 2024 at 15:32):

@Yoshua Wuyts there are a couple of prs about .dwp file support that may have more information


Last updated: Dec 23 2024 at 12:05 UTC