title: Getting gdb to automatically load binary from core file
body: <p>Can I get gdb to automatically load the binary that's specified in the core file?</p>
  
  <p>Given a core file I now usually do:</p>
  
  <pre><code>gdb -c corefile
  GNU gdb 6.8
  ...
  Core was generated by `/path/to/binary'
  </code></pre>
  
  <p>Then i copy-paste that and run:</p>
  
  <pre><code>gdb -c corefile /path/to/binary
  </code></pre>
  
  <p>It seems like an unnecessary two-step process and yet I don't seen an obvious way of doing it based on the man page. Am I missing something?</p>