8.4 Compiling For Debugging

If you wish to compile for debugging, you should use GCC. After running configure but before running make, edit the Makefile and remove the -O2 flag from the definition of CFLAGS. Optionally, do the same for support/Makefile and/or extensions/Makefile. Then run make.

You can enable additional debugging code by creating a file named .developing in the gawk source code directory before running configure. Doing so enables additional conditionally-compiled debugging code within gawk, and adds additional warning and debugging options if compiling with GCC. It also disables optimization.