Previous: Shell Commands, Up: Invocation
You may want to save the output of gdb commands to a file. There are several commands to control gdb's logging.
set logging onset logging offset logging file fileset logging overwrite [on|off]overwrite if
you want set logging on to overwrite the logfile instead.
set logging redirect [on|off]redirect if you want output to go only to the log file.
show logging