pub fn run_commands(
config: Box<DebuggerConfig>,
script_path: &Path,
) -> Result<(), Report>Expand description
Run a script of debugger commands non-interactively, then return.
This is the batch / “source a command file” mode, analogous to
gdb -x <file> -batch or lldb -s <file>. The program to debug is loaded
from config exactly as for an interactive session.
Each line of the file is one REPL command, using the same syntax as the
interactive prompt. Blank lines and lines beginning with # are ignored, so
scripts can be commented — and a script can double as a lit/FileCheck test
input, where the # RUN: and # CHECK: lines are skipped here and consumed
by the test runner instead. A quit command, or end of file, ends the run.
Command output goes to stdout; command/parse errors go to stderr and do not abort the script.