[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
4.5 Your Program's Working Directory
Each time you start your program with run
, it inherits its
working directory from the current working directory of No value for GDBN.
The No value for GDBN working directory is initially whatever it inherited
from its parent process (typically the shell), but you can specify a new
working directory in No value for GDBN with the cd
command.
The No value for GDBN working directory also serves as a default for the commands that specify files for No value for GDBN to operate on. See section Commands to Specify Files.
-
cd directory
Set the No value for GDBN working directory to directory.
-
pwd
Print the No value for GDBN working directory.
It is generally impossible to find the current working directory of
the process being debugged (since a program can change its directory
during its run). If you work on a system where No value for GDBN is
configured with the ‘/proc’ support, you can use the info
proc
command (see section SVR4 Process Information) to find out the
current working directory of the debuggee.