title: Getting GDB to save a list of breakpoints
body: <p>OK, <em><a href="https://sourceware.org/gdb/onlinedocs/gdb/Set-Breaks.html" rel="noreferrer">info break</a></em> lists the breakpoints, but not in a format that would work well with reusing them using the --command <a href="https://stackoverflow.com/questions/500967/gdb-breakpoints">as in this question</a>. Does GDB have a method for dumping them into a file acceptable for input again?  Sometimes in a debugging session, it is necessary to restart GDB after building up a set of breakpoints for testing.</p>
  
  <p>The .gdbinit file has the same problem as --command. The <em>info break</em> command does not list commands, but rather a table for human consumption.</p>
  
  <p>To elaborate, here is a sample from <em>info break</em>:</p>
  
  <pre>
  (gdb) info break
  Num Type           Disp Enb Address    What
  1   breakpoint     keep y   0x08048517 &lt;foo::bar(void)+7&gt;
  </pre>