The arguments to your program can be specified by the arguments of the
run command. They are passed to a shell, which expands wildcard
characters and performs redirection of I/O, and thence to your program.
SHELL environment variable (if it exists) specifies what
shell GDB uses. If you do not define
run with no arguments uses the same arguments used by the previous
run, or those set by the
set args command.
set argshas no arguments,
runexecutes your program with no arguments. Once you have run your program with arguments, using
set argsbefore the next
runis the only way to run it again without arguments.
Go to the first, previous, next, last section, table of contents.