On Sat, 2003-10-25 at 21:29, Bruce Momjian wrote:
> configure --enable-debug will use -g for the compile, and with
> optimization.
I'm just curious: would there be any benefit to using -g3 when
--enable-debug is specified and -g3 is supported by gcc? From the gcc
man page:
-glevel
[...]
Request debugging information and also use level to specify how much information. The default level is 2.
Level 1 produces minimal information, enough for making backtraces in parts of the program that you don't plan to
debug. This includes descriptions of functions and external variables, but no information about local variables and
noline numbers.
Level 3 includes extra information, such as all the macro defini- tions present in the program. Some debuggers
supportmacro expan- sion when you use -g3.
Note that in order to avoid confusion between DWARF1 debug level 2, and DWARF2, neither -gdwarf nor -gdwarf-2 accept
aconcatenated debug level. Instead use an additional -glevel option to change the debug level for DWARF1 or DWARF2.
-Neil