Whole document tree
    

Whole document tree

Debugging with GDB: Source
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7. Examining Source Files

GDB can print parts of your program's source, since the debugging information recorded in the program tells GDB what source files were used to build it. When your program stops, GDB spontaneously prints the line where it stopped. Likewise, when you select a stack frame (see section Selecting a frame), GDB prints the line where execution in that frame has stopped. You can print other portions of source files by explicit command.

If you use GDB through its GNU Emacs interface, you may prefer to use Emacs facilities to view source; see Using GDB under GNU Emacs.

7.1 Printing source lines  
7.2 Searching source files  
7.3 Specifying source directories  
7.4 Source and machine code  



This document was generated by root on January, 30 2002 using texi2html