with normal interpreter, one can run a program with redirected inputs and outputs like this:
run < input_file > output_file
In MI mode, run command equivalent is -exec-run but it does not take argument for I/O redirection and I did not find any dedicated command.
What is the way to do redirection in MI mode ?
You can use
-exec-arguments
for this: