echo 'here is the text' > intput.txt
gdb ./program
(gdb) run < intput.txt
-1
votes
You can do using --args option giving program executable followed by arguments as below,
% gdb --args ./program arg1 arg2
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more