Search notes:
gcc -g
gcc -g
creates information suitable for debbuging a program with
gdb
.
Because a program should not be altered in any way when debugging information is added, the creators of gcc don't want have a specially defined
macro
when compiling with
-g
.
Some options
Some
-g
related options are:
-g
: Generate default debug info (
DWARF
)
-g3
: Include info for
macros
.
-ggdb
: Add specific
GDB
information.
-gdwarf[234]
: DWARF 2, 3 or 4 info
-gstrict-dwarf
: No extensions from later DWARF.
See also
readelf
-w
dumps all DWARF data.
-Og
GCC options
Index