I have a small application let's call it program. In general to use this application I need to stream a file into it:

./program < file_with_data.txt

How do I debug such program using dbg? I don't know how to pass data from file to program when it is controlled by dbg.


Found it:after running:

gdb program


run < file_with_data.txt
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.