title: GCC -g vs -g3 GDB Flag: What is the Difference?
body: <p>When compiling C source code with either gcc or Clang, I always use the <code>-g</code> flag to generate debugging information for gdb.</p>
  
  <p><code>gcc -g -o helloworld helloworld.c</code></p>
  
  <p>I noticed that some people recommend <code>-g3</code> instead. What is the difference between the <code>-g</code> and <code>-g3</code> flags? Also is there a difference between <code>-g</code> and <code>-ggdb</code>?</p>