Go to the first, previous, next, last section, table of contents.


Your program's working directory

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
Set the GDB working directory to directory.
pwd
Print the GDB working directory.


Go to the first, previous, next, last section, table of contents.