I'm running gdb (or cgdb) but during the debug I need to get some data from stdin. So how can I insert some text or numbers as input to the program while I debug it in gdb?
Thanks in advance!
I'm running gdb (or cgdb) but during the debug I need to get some data from stdin. So how can I insert some text or numbers as input to the program while I debug it in gdb?
Thanks in advance!
If you were doing it from a shell you'd do it like this:
gdb myprogram
gdb> run params ... < input.txt