gdb --args path/to/executable -every -arg you can=think < of
After that
Enter run
to start debugging the gdb command console.
In gdb, as shown below
(gdb) r args... < file
When you do this or send the output of the program immediately
(gdb) r args... $(program > file) < file
I think I did it like this, too. However, after the program finishes printing, the output goes into the input.
© 2024 OneMinuteCode. All rights reserved.