title: Use gdb to find where program stuck
body: <p>My program is not working correctly.
  It looks like it is stuck in an infinite loop or a bad mutex lock/unlock. But, I have no idea where the bug is.
  I tried using gdb for debugging.</p>
  
  <p>I can't use gdb backtrace command because I don't designate breakpoint.
  And I can't designate it because I don't have any idea where the error is.</p>
  
  <p><strong>Does gdb have instrument for backtrace "on the fly"?</strong></p>