redirect I/Os in GDB in MI mode

177 views Asked by At

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 ?

1

There are 1 answers

1
Tom Tromey On BEST ANSWER

You can use -exec-arguments for this:

-exec-arguments < /path/to/somefile
-exec-run