-
Notifications
You must be signed in to change notification settings - Fork 758
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
How to get a call stack when wasm-ctor-eval stops? #7255
Comments
We don't have an option for this atm. You can approximate it by running in a debugger and stopping on any Supporting this "properly" would require a shadow stack of some sort. Adding a basic version, that notes functions as it enters and leaves them, would at least give a basic stack trace, and shouldn't be too hard to add. Adding precise binary offsets would be possible but harder. |
Even just the function names would be very helpful already. Would it be easier to ask for a spammy debug log feature that just prints an indented name of the function as it enters it? Then I can just work upward from the last bit before it stopped. |
Oh, we do have a spammy option already I believe. Add #define WASM_INTERPRETER_DEBUG 1 at the top of |
The new interpreter will make it much easier to support this use case. |
Thanks! I'm looking forward to the new interpreter. I've managed to achieve what I need using wizer in the meantime, which gives a stack trace when it encounters an external call. On top of that, wizer lets me pass in external data (via a wasi call), which I need for my use case while there does not seem to be a way to do this with wasm-ctor-eval. Are the plans for the new interpreter documented somewhere? |
The only documentation so far is this PR/commit description: #7227 |
Hello,
Apologies if this is already documented somewhere, but I was unable to find it. I'm trying to find out how I can easily find where a particular call to an import is being made when wasm-ctor-eval hits something it can't eval. I was hoping to find some debug option so that I could see something like a traceback.
At the moment I am manually searching through the wasm disassembly, which is quite a painstaking process given that this is a huge binary. Any suggestions for making this process easier would be very helpful.
The text was updated successfully, but these errors were encountered: