www.delorie.com/gnu/docs/gdb/gdb_169.html   search  
Buy the book!

Debugging with GDB

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ] Setting file to debug

The GDB command file lets you choose with program to debug.

(gdbslet) file prog

GDB then attempts to read the symbol table of `prog'. GDB 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. GDB 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 GDB commands path and dir, and execute the target command again.

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003