Go to the previous, next section.

_GDBN__'s Files

_GDBN__ needs to know the file name of the program to be debugged, both in order to read its symbol table and in order to start your program. _if__(!_BARE__) To debug a core dump of a previous run, _GDBN__ must be told the file name of the core dump. _fi__(!_BARE__)

Commands to Specify Files

_if__(!_BARE__) The usual way to specify executable and core dump file names is with the command arguments given when you start _GDBN__, (see section Getting In and Out of _GDBN__. _fi__(!_BARE__) _if__(_BARE__) The usual way to specify an executable file name is with the command argument given when you start _GDBN__, (see section Getting In and Out of _GDBN__. _fi__(_BARE__)

Occasionally it is necessary to change to a different file during a _GDBN__ session. Or you may run _GDBN__ and forget to specify a file you want to use. In these situations the _GDBN__ commands to specify new files are useful.

file filename
Use filename as the program to be debugged. It is read for its symbols and for the contents of pure memory. It is also the program executed when you use the run command. If you do not specify a directory and the file is not found in _GDBN__'s working directory, _GDBN__ uses the environment variable PATH as a list of directories to search, just as the shell does when looking for a program to run. You