title: How can I suppress error messages and silently continue a GDB script?
body: <p>I have a GDB script that is deadreckon'ing up the callstack and blindly calling <code>list</code> and <code>up</code> using gdb 7.2:</p>
  
  <pre><code>gdb -q -batch -x gdb.cmd 
  </code></pre>
  
  <p><code>gdb.cmd</code> has:</p>
  
  <pre><code>list
  up-silently
  list
  up-silently
  [...]
  </code></pre>
  
  <p>Unfortunately, this will fail if gdb can't find the source file or it is inside a library that wasn't compiled with <code>-g</code>:</p>
  
  <pre><code>gdb.cmd:30: Error in sourced command file:
  Line number 63 out of range; /home/ross/tmp.cc has 62 lines.
  </code></pre>
  
  <p>How can I suppress all errors and continue executing the script even if <code>list</code> or any other command fails?</p>