DEBUGGING STAGE
BUILD W/ DEBUGGING SYMBOLS
root@dev:~$ gcc -Wall -Wshadow -g -c programName.c -o objectFileOnly.o
root@dev:~$ ls
programName.c programName.o
* the -g adds debugging information to the compiled output.
- this enabled devs or sre to use a debugger like gdb to step through the
code line-by-line
* the -c compiles only and doesn't link.
- it creates an object file (programName.o), NOT an executable yet.32-BIT W/O OPTIMIZATION
#OPTIMIZATION TURNED OFF
root@dev:~$ gcc -Wall -Wshadow -g -m32 -O0 sourceFile.c outputFile.out64-BIT W/O OPTIMIZATION
#OPTIMIZATION TURNED OFF
root@dev:~$ gcc -Wall -Wshadow -g -m64 -O0 sourceFile.c -o outputFile.outDISPLAY COMMON WARNINGS AND ERRORS
Last updated