I’d like to ask how to debug some program using gdb that reads from stdin.
g++ -Wall test.c -o test
and I’m running it as
./test < test.in
I tried to debug it in gdb (none of those two tries worked)
gdb test < test.in
and in gdb
(gdb) run < test.in
but I’m getting
Starting program: < test.in No executable file specified. Use the "file" or "exec-file" command.
Any idea what am I doing wrong?