Stream: general

Topic: Debugging a raw wasm file?


view this post on Zulip Teymour Aldridge (Jan 23 2022 at 17:57):

Is there any documentation on how to attach LLDB/GDB to a raw wasm file (i.e. a handwritten one which was not produced by a compiler) and see the values of locals at different points in the execution?

view this post on Zulip bjorn3 (Jan 23 2022 at 20:50):

AFAIK wasmtime currently requires dwarf debuginfo to exist in the wasm file to be able to emit any debuginfo itself. It doesn't generate any debuginfo for locals or the wasm stack.

view this post on Zulip Teymour Aldridge (Jan 24 2022 at 17:11):

Ugh. Is this something that would be interesting to add to Wasmtime?

view this post on Zulip bjorn3 (Jan 24 2022 at 18:34):

I opened an issue for this over a year ago: https://github.com/bytecodealliance/wasmtime/issues/439 It is nice to have, but not a high priority for now.

For example, wasmtime could use the function index within the wasm file as function name. It could also expose the wasm stack as fake variables, and when possible, it could show the arguments. It w...

Last updated: Nov 22 2024 at 16:03 UTC