I am trying to debug a program using gdb mode in emacs. It was compiled with g ++ and I am using cygwin. My program accepts a single command line argument and also accepts input from stdin, which I redirect from a file, for example:
program.exe inputFile.dat <otherInput.dat
The problem is that gdb sends a string
"<otherInput.dat"
as a command line argument instead of stdin redirection. How to get gdb to redirect stdin?
EDIT:
Inside gdb, I use the command:
run inputFile.dat <otherInput.dat
This does not work when I use gdb outside of emacs.
EDIT # 2:
dfa pointed out a similar question: How to load reading the stdin program and selecting options in gdb?
Unfortunately, the accepted answer to this question does not work for me ... Could this be a cygwin related error?