title: How do you use gdb?
body: <p>I decided to find out how our C/C+ *nix practitioners use the gdb debugger.</p>
  
  <p>Here is  what I typically use:</p>
  
  <ol>
  <li>b - break filename.c:line #, function, filename.cpp:function, className::Member</li>
  <li>n, c, s -- next continue step</li>
  <li>gdb program name => set breakpoints ==> run  [parameter list] (I do this to set break points before the program starts)</li>
  <li>l - to list the surrounding source code.</li>
  <li>attach processID 
  6 break [location] </li>
  <li>gdb programName corefile.core (to examine why app crashed)</li>
  <li>I also sometimes set breakpoint at exit  function (break exit) to examine program stacks</li>
  <li>info b to examine all the breakpoints</li>
  <li>clear [breakpoints list ]</li>
  </ol>
  
  <p>How do you use it? </p>