title: What are the best ways to automate a GDB debugging session?
body: <p>Does GDB have a built in scripting mechanism, should I code up an expect script, or is there an even better solution out there?  </p>
  
  <p>I'll be sending the same sequence of commands every time and I'll be saving the output of each command to a file (most likely using GDB's built-in logging mechanism, unless someone has a better idea).</p>