GNU/Linux Application Programming (Programming Series)
If we want to debug our code with a symbolic debugger, we can specify the -g flag to produce debugging information in the image for GDB. The -g option can specify an argument to specify which format to produce. To request debugging information to be produced using the dwarf-2 format, we would provide the option as follows :
$ gcc -gdwarf-2 test.c -o test
Категории