You are using the steps at https://github.com/hyperlight-dev/hyperlight/blob/main/docs/how-to-debug-a-hyperlight-guest.md to attach gdb to the guest process? You could try if enabling debug-builtins compiles. Also make sure to tell Wasmtime to generate debuginfo in the first place (config.debug_info(true)).
2 messages were moved here from #wasmtime > Debugging wasm with lldb/gdb by bjorn3.
Yes, I am using the steps in Hyperlight, this is not related to hyperlight.
I am able to attach and debug the guest. However, when the guest tries to use the wasmtime runtime to execute a module, I am not able to make gdb/lldb interactively debug the wasm source code for the module
I provided the config.debug_info(true) option to the wasmtime Engine Config.
I am wondering whether the debug-builtins are needed for this to work.
Yeah, I believe you need to enable debug-builtins.
I've looked more thoroughly and tested and it does need the debug-builtins feature to allow debugger inspect the wasm module at runtime.
I cannot enable debug-builtins because it depends on the std feature and I am running in a no_std environment.
I've browsed the code that depends on the debug-builtins feature, and I am not sure, but it looks like that could be modified to run in a no_std env.
What do you think?
When no_std support was added most preexisting features were flagged as requiring std blindly. If debug-builtins works without std then that's great! If you're able to help out (which would be much appreciated!) the fix would look like configuring CI to test the feature here (e.g. adding it to the list of features already built) and then fixing up any issues that arise.
Thanks for the explanation, Alex!
I'll try make it not depend on std :smile:
GO DORU GO
I've submitted a PR regarding this no_std support for the debug-builtins feature, and I can't seem to figure out why cargo vet fails.
https://github.com/bytecodealliance/wasmtime/pull/11304
We are targeting Wasmtime 36.0.0 LTS release to use for debugging wasm modules/components running in the no_std environment of a Hyperlight guest.
Thanks for the help provided in merging this! It is in time for the v36.0.0 right?
It is indeed yeah, that'll branch next week
Last updated: Dec 06 2025 at 06:05 UTC