title: gdb - debugging with piped input (not arguments)
body: <p>I typically run my program with:</p>
  
  <pre><code>perl -e 'print "A"x200' | ./vuln_prog
  </code></pre>
  
  <p>The stdin is consumed by a <code>gets()</code> function in C++.</p>
  
  <p>If this were just a command argument, I could open gdb by doing:</p>
  
  <pre><code>gdb ./vuln_prog
  run $(perl -e 'print "A"x200')
  </code></pre>
  
  <p>However, my scenario is not a command argument, but rather input (STDIN?).  How would I debug this in gdb?  I've tried a bunch of options, but nothing seems to really work.</p>
  
  <p>I would normally just run gdb on the process, and when it prompts for user input, type it in, however I'm not wanting to type just "A".  I want to type all chars from \x00-\xff, which I can't type.</p>