40
-gdwarf+
Produce debugging information in DWARF version 1 format (if that is supported), using GNU
extensions understood only by the GNU debugger (GDB). The use of these extensions is likely
to make other debuggers crash or refuse to read the program.
This option is deprecated.
-gdwarf-2
Produce debugging information in DWARF version 2 format (if that is supported). This is the
format used by DBX on IRIX 6.
-gvms
Produce debugging information in VMS debug format (if that is supported). This is the format
used by DEBUG on VMS systems.
-g
level
-ggdb
level
-gstabs
level
-gcoff
level
-gxcoff
level
-gvms
level
Request debugging information and also use
fault 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 no line numbers.
Level 3 includes extra information, such as all the macro definitions present in the program.
Some debuggers support macro expansion when you use
Note that in order to avoid confusion between DWARF1 debug level 2, and DWARF2, neither
nor
-gdwarf
-gdwarf-2
option to change the debug level for DWARF1 or DWARF2.
-feliminate-dwarf2-dups
Compress DWARF2 debugging information by eliminating duplicated information about each
symbol. This option only makes sense when generating DWARF2 debugging information with
.
-gdwarf-2
-p
Generate extra code to write profile information suitable for the analysis program
must use this option when compiling the source files you want data about, and you must also use
it when linking.
-pg
Generate extra code to write profile information suitable for the analysis program
must use this option when compiling the source files you want data about, and you must also use
it when linking.
-Q
Makes the compiler print out each function name as it is compiled, and print some statistics about
each pass when it finishes.
level
accept a concatenated debug level. Instead use an additional
Chapter 4. GCC Command Options
to specify how much information. The de-
.
-g3
-g
level
. You
prof
. You
gprof
Need help?
Do you have a question about the ENTERPRISE LINUX 3 - USING GCC and is the answer not in the manual?
Questions and answers