- first thing to try, is reduce optimization to -O0 (see Makefile).
- Try -O1
- Then "-O2 --closure 0 --minify 0"
- Then enable closure (but not minification) - helps to see if how the code is closured/minified. Also see: emscripten-core/emscripten#704
- run
make binandmake bin-testto run the AWK program as a native binary executable. - Try running the same AWK script with GNU AWK, and with BusyBox's AWK - to pinpoint if the bug is related to the changes made in this project.
- GDB can debug the
awk_binfile easily.
- Enable "NODE_JS_DEBUG" in ./busybox/include/libbb.h to see some progress messages. Add more and re-compile if needed:
node_js_debug("something is wrong, i=%d\n", i);
Will work in the binary version, node.js version and web version.