title: Set breakpoint on every line in GDB
body: <p>Is there a way to set a breakpoint at every line in the code with GDB? Obviously I don't want to hit <code>b *addr</code> for every single line, so I'm wondering if there's a fast way to do this.</p>
  
  <p><strong>Edit</strong>
  Note that I am running a binary created by someone else and I do not have access to the source code. Unfortunately, that binary has not been compiled with the -g flag. Therefore, I cannot just single step through each line in the code.</p>
  
  <p><strong>Further Edit</strong>
  As Jason points out below, you can indeed single step through the code so long as you use <code>si</code> or <code>ni</code>, as opposed to just simply <code>s</code> (step) or <code>n</code> (next). <code>n</code> or <code>s</code> work fine, though, if the source code had been compiled with -g, but it steps through lines of source code, as opposed to stepping through every assembly instruction like <code>ni</code> or <code>si</code> do in a binary that was compiled without -g.</p>