-
Notifications
You must be signed in to change notification settings - Fork 693
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
Source maps for wasm2c? #2215
Comments
It would be nice to have something like this, because it's pretty challenging to debug a program that's been compiled from, e.g., C++ (via g++) to Wasm (and then, via wasm2c) to C (and then, via gcc) to ELF. See #1210 & #432. An MVP might be to make wasm2c include little comments next to each line of a function body, giving a Wat version of the Wasm instruction, so that if you then compile wasm2c's output with But it would be really nice to plumb it all the way through somehow so that a debugger of the final object file can show the original high-level source code. |
I think we could use C pre-processor directives: https://gcc.gnu.org/onlinedocs/cpp/Line-Control.html |
yup, the C-preprocessor debug directives was something I was hoping to do for several months now, but I don't think I have time on my roadmap. I would love to see support for something like this too! |
In w2c2 we parse the DWARF debug info (if provided) from the module, and generate C |
(Sorry for the delay in responding was traveling) |
Does it... make any sense to have source maps for wasm2c?
The text was updated successfully, but these errors were encountered: