User`s guide
13
Chapter 3
3. Examining Source Files
This chapter explains how to examine source files under dbx. It describes:
• “Specifying Source Directories”
• “Changing Source Files”
• “Listing Source Code”
• “Searching Through Source Code”
• “Calling an Editor”
Specifying Source Directories
Based on the information contained in an object file’s symbol table, dbx
determines from which source files the program was compiled and prints
portions of these files as appropriate.
Object files compiled with –g record the absolute path names to the source
files. Each time dbx needs a source file, it first searches the absolute path for
the source file. If the source file is not present (or if the object file was not
compiled with –g), dbx checks its own list of directories for source files.
By default, the dbx directory list contains only the current directory (from
which you invoked dbx) and the object file’s directory (if it is different from
the current directory). Each time dbx searches this list, it searches all
directories in the list in the order in which they appear until it finds the file
with the specified name.
Specifying Source Directories With Arguments
You can specify additional source directories when you invoke dbx with the
–I option. To specify multiple directories, use a separate –I for each.