Question about running a program with gdb
I hope I posted this in the right place....
Anyway, I have a program written in C that I'm trying to run in gdb but I can't figure out how to get my input into the program. The program uses getchar() so I normally run it as:
>echo "input" | ./program
So somehow I need to do the echo "input" part in gdb before I do the run command and have the program run as it should, but I don't know the syntax for doing so or if it's actually even possible (because I'm a newbie :p). It'd be easy to fix it to have main() just take an argument, but I can't modify the program, so it has to be this way. Any advice would be appreciated!
Instead of writing
So in gdb you can type:
|All times are GMT -5. The time now is 02:56 AM.|