title: How to pass arguments and redirect stdin from a file to program run in gdb?
body: <p>I usually run a program as :</p>
  
  <pre><code>./a.out arg1 arg2 &lt;file
  </code></pre>
  
  <p>I would like to debug it using gdb.</p>
  
  <p>I am aware of the <code>set args</code> functionality, but that only works from the gdb prompt.</p>