Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22250

GCC -g vs -g3 GDB Flag: What is the Difference?

$
0
0

When compiling C source code with either gcc or Clang, I always use the -g flag to generate debugging information for gdb.

gcc -g -o helloworld helloworld.c

I noticed that some people recommend -g3 instead. What is the difference between the -g and -g3 flags? Also is there a difference between -g and -ggdb?


Viewing all articles
Browse latest Browse all 22250

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>