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,
-g0negates-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
Post a Comment