Debugging Options


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 



GNU/Linux Application Programming
GNU/Linux Application Programming (Programming Series)
ISBN: 1584505680
EAN: 2147483647
Year: 2006
Pages: 203
Authors: M. Tim Jones

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net