title: How to pass the output of a command as argument in gdb?
body: <p>I have a C program that accepts arguments. I want to pass arguments to it while debugging through gdb but I want to specify the arguments through, say, a python command. So,</p>
  
  <p><code>(gdb) run &gt;&gt;python return "a"*20 #arg1 &gt;&gt;python return 1+2 #arg2</code></p>
  
  <p>How can I do this? The reason why I want to do this is because I want to pass bytecode address to the program as an argument but if I pass it as a sting it just converts everything to ASCII. i.e. if I try:</p>
  
  <p><code>(gdb) run \xf7\xff\xba\xb5</code></p>
  
  <p>then the address that I gave above is just converted into an ASCII string instead of being used as a memory address. I think if my first query is answered my second query might also get answered.</p>
  
  <p>Thanks.</p>