c - gcc -g0 and without the -g option -


what difference between compiling without -g option , compiling -g0 option in gcc? there specific reason behind giving -g0 option in gcc? tried compiling , found "no debugging symbols" message both cases in gdb.

if go gcc manual, find says:

-glevel

request debugging information , use level specify how information. default level 2.

level 0 produces no debug information @ all. thus, -g0 negates -g.

so, don't use -g0 if want debug information. if want debug information, remember use -g option both when creating object files (-c) , when linking program.

and compiling without -g @ , compiling -g0 equivalent , there no debugging information in resulting binaries — found experimentation.


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -