How to run GDB with the results of a script?
<p>Simple, maybe not so simple issue. How can I run GDB with the results of a script?</p>

<p>What I mean is that instead of saying:</p>

<pre><code>run arg1 
</code></pre>

<p>You would say:</p>

<pre><code>run "python generatingscript.py" 
</code></pre>

<p>which would output the args. I'm aware I could find a way to do this by sleeping the program after run the args from the command line, but it would be really darn convenient if there was a way to do this kind of thing directly in gdb. </p>

<p>Just for context, my use case is a situation where I writing crash test cases that look like long strings of hex data. Putting them in by hand at the command line isn't the most convenient thing. </p>