-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wasm component module debugging - failure to step into the source code #9426
Comments
Configuration of wasmtime engine
|
|
Do I need to include this feature "debug-builtins" in wasmtime crate to enable the debug symbols? |
well adding the crate feature also did not help |
Would you be able to share snippets of the component/embedding in question? Or perhaps a snippet using the |
Module Code
|
App code that launches the runtime and loads the module and I am debugging this app
|
My goal is to step into the source code of |
@ggjjj I appreciate that you provided some source code here, but it is incomplete and contains syntactical errors (eg no type on Could you provide a git repo containing a fully self contained example that we can simply clone as well as detailed steps reproduce with exactly that git repo? Something like the following:
The easier you can make it to reproduce the bug exactly, without needing to fix source code that doesn't build or infer steps that are implied but not explicitly described, the better we can help you and diagnose/resolve the bug that you are seeing. Thanks! |
I understand but we are working on private code. so is there any way I can debug this further? @fitzgen |
Have you tried making a minimal reproducer that doesn't contain your private code? |
I am trying that. Is this a sample that you recommend? |
If you can get that example to reproduce your issue, then that sounds great. If you can't get that example to reproduce your issue, then I'd suggest trying to make calls and link modules/components together in a similar shape as your private code in an effort to find something that will reproduce the bug. |
Sample tried - Steps followed
I was succesfully able to step into source code in guest.rs Next I switched to Steps followed
**Error: failed to decode world from module Caused by: |
My goal was to convert the module to adapt to wasi-preview1 by
and use guest-wasi.wasm to load in |
I tried to use the guest-wasi.wasm in line53 of main.rs after the above
|
I used 25.0.2 snapshot file |
May I know why 26.0.0 is wasmtime version when only 25.0.2 is released? |
@fitzgen Hey Nick did you get a chance to look at this one? |
@ggjjj it looks like there's a lot going on here with quite a few possibilities of what could be going wrong. We can try to piece together everything from the snippets of information you're posting but it'd be much more helpful to us as maintainers if you're able to do what Nick mentioned above with having a reproducible set of steps. It looks like you're trying a lot of things all at once and each thing is failing in different ways which may be unrelated to the original issue |
Agree and apologize for including some many of the methods I tried in once. ok let me start step by step. Goal 1 - Try the component example with wasm32-wasip1. Minimal test case: url-of-git-repo Steps to reproduce:
Expected Results
Actual Results
|
@alexcrichton @fitzgen Is the above format okay? Is there any other information needed? Please advise |
bytecodealliance/wasm-tools#1854
I am using a rust application that launches the wasmtime with debug_info() set to true and loads a WASM module that implements component module.
I use wasm-tools to get the module adapted to wasi by
wasm-tools component new ./target/wasm32-wasip1/debug/module1.wasm -o ./tests/data/wasm-modules/processor-module1-$(VERSION).wasm --adapt wasi_snapshot_preview1.reactor.wasm
I also confirmed that the
wasm-tools objdump
to see that the debug_info information exists.now once I launch the debugger for the rust application, I am only able to step into a
call()
function and but not in the wasm module source code.is there any other step am I missing?
The text was updated successfully, but these errors were encountered: