-
Notifications
You must be signed in to change notification settings - Fork 5
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
Optionally generate DWARF debugging info for Wasm files #4
Comments
I implemented this feature in main repository. I saved |
Thanks for working on this! I don't have any relevant experience with this, but I have a couple of suggestions:
|
Sure I did. Of course, there are many differences, there's too much information I need to understand and too much functionality to implement. I believe, the basic things are similar. At least, as far as I understand.
That's it! I could do everything myself, learn how to use Rust, learn Rust itself, learn how to build wasmtime, how to debug it, learn its source code and find the relevant one, learn how it works and why it rejects TeaVM-related module. OR. Perhaps there's already a Rust/Wasmtime/DWARF hacker who actually contributes to wasmtime, I perhaps you could know one to ask their help. This would save me much time. |
Ok, I found the issue and now something work. gdb shows definitely wrong locations, but at least they point somehwhere not far from original ones. Also, gdb crashes quickly when trying to debug PI calculator. Also, Chrome still does not recognize DWARF. But not we have at least something working, which can further be improved and fixed. |
That's it. Now it finally works. I managed to walk through PI calculator, with some rare glitches like jumping on random line. But in most cases debugger placement was precise. There's still this weird issue with gdb/wasmtime, but only in case I put breakpoint on main method and start walking. I also tried with Ctrl+C during calculation, and in this case gdb works find. lldb does not work for me, just does not display any useful information. Chrome works fine, except for "step over" , which seems to step on every instruction instead of skipping whole line. |
This would make debugging using e.g.
wasmtime
andgdb
much more useful. To start with, just having line numbers would be a big win. Local variable info would be great, also.The text was updated successfully, but these errors were encountered: