manpagez: man pages & more
info gdb
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

18.3.8.1 Setting File to Debug

The No value for GDBN command file lets you choose with program to debug.

 
(gdbslet) file prog

No value for GDBN then attempts to read the symbol table of ‘prog’. No value for GDBN locates the file by searching the directories listed in the command search path. If the file was compiled with debug information (option ‘-g’), source files will be searched as well. No value for GDBN locates the source files by searching the directories listed in the directory search path (see section Your Program's Environment). If it fails to find a file, it displays a message such as:

 
prog: No such file or directory.

When this happens, add the appropriate directories to the search paths with the No value for GDBN commands path and dir, and execute the target command again.


© manpagez.com 2000-2017
Individual documents may contain additional copyright information.