diff -NaurpX /home/ibr/tmp/root/prg/dontdiff.ibr src.orig/gdb/doc/gdb.texinfo src-ibr/gdb/doc/gdb.texinfo --- src.orig/gdb/doc/gdb.texinfo Sun Mar 28 14:22:55 2004 +++ src-ibr/gdb/doc/gdb.texinfo Sat May 1 18:11:44 2004 @@ -4517,16 +4517,21 @@ the directories could be moved between t session. @value{GDBN} has a list of directories to search for source files; this is called the @dfn{source path}. Each time @value{GDBN} wants a source file, it tries all the directories in the list, in the order they are present -in the list, until it finds a file with the desired name. Note that -the executable search path is @emph{not} used for this purpose. Neither is -the current working directory, unless it happens to be in the source -path. +in the list, until it finds a file with the desired name. -If @value{GDBN} cannot find a source file in the source path, and the -object program records a directory, @value{GDBN} tries that directory -too. If the source path is empty, and there is no record of the -compilation directory, @value{GDBN} looks in the current directory as a -last resort. +For example, suppose an executable references the file +@samp{/usr/src/foo-1.0/lib/foo.c}, and our source path is +@samp{/mnt/cross}. The file is first looked up literally; if this +fails, @samp{/mnt/cross/usr/src/foo-1.0/lib/foo.c} is tried; if this +fails, @samp{/mnt/cross/foo.c} is opened; if this fails, an error +message is printed. The subdirectories of source path directories or +parts of the source pathname are not looked up. Plain filenames, +relative pathnames, pathnames with dots, etc. are all treated as +described above. + +Note that the executable search path is @emph{not} used to locate the +source files. Neither is the current working directory, unless it +happens to be in the source path. Whenever you reset or rearrange the source path, @value{GDBN} clears out any information it has cached about where source files are found and where