Closed tsavola closed 2 years ago
Debug info is something we don't really have good support for (or really, any support for) in s2wasm right now. Currently we are focusing on making proper use of LLVM's MC infrastructure (e.g. https://reviews.llvm.org/D26722) along with wasm binary format support in LLVM. That will be the useful base on which we can build debug info support. There is a ways to go before we have something useful (ultimately we want to provide primitives which will make it possible to implement debuggers for any language in JS or wasm), although we may end up supporting something like source maps in the interim.
We deleted s2wasm a long time ago, so closing this.
I've tested this with the latest LLVM/clang trunk and binaryen master, built a few moments ago.
C source:
Build commands:
Error from s2wasm:
The problem goes away when removing the -g option from clang invocation, or changing the size_t result type to something else.
bug.s looks like this: