7.3.2.5 Debugging
-g level
(Debugging level)-g1
It produces minimal information, enough for making backtraces in parts of the program that you don't plan to debug, including descriptions of functions and external variables but no information about local variables and no line numbers.
-g2
It is the default debugging level.
-g3
It includes extra information, such as all the macro definitions present in the program. Some debuggers support macro expansion when you use -g3.