Each time you start your program with run
, it inherits its
working directory from the current working directory of GDB.
The GDB working directory is initially whatever it inherited
from its parent process (typically the shell), but you can specify a new
working directory in GDB with the cd
command.
The GDB working directory also serves as a default for the commands that specify files for GDB to operate on. See section Commands to specify files.
cd directory
pwd
Go to the first, previous, next, last section, table of contents.