From c011a4f469702871cbd5a1e7fecdb57d322642bd Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Tue, 15 Nov 2011 17:40:02 +0000 Subject: * NEWS: Mention new parameter basenames-may-differ. * dwarf2read.c (dw2_lookup_symtab): Avoid calling gdb_realpath if ! basenames_may_differ. * psymtab.c (lookup_partial_symtab): Ditto. * symtab.c (lookup_symtab): Ditto. (basenames_may_differ): New global. (_initialize_symtab): New parameter basenames-may-differ. * symtab.h (basenames_may_differ): Declare. doc/ * gdb.texinfo (Files): Document basenames-may-differ. --- gdb/doc/ChangeLog | 4 ++++ gdb/doc/gdb.texinfo | 27 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) (limited to 'gdb/doc') diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 15659d6..4975cd2 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,7 @@ +2011-11-15 Doug Evans + + * gdb.texinfo (Files): Document basenames-may-differ. + 2011-11-14 Doug Evans * gdb.texinfo (Shell Commands): Document "!". diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 9255b89..f4f7f1e 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -15705,6 +15705,33 @@ This is the default. @end table @end table +@cindex file name canonicalization +@cindex base name differences +When processing file names provided by the user, @value{GDBN} +frequently needs to compare them to the file names recorded in the +program's debug info. Normally, @value{GDBN} compares just the +@dfn{base names} of the files as strings, which is reasonably fast +even for very large programs. (The base name of a file is the last +portion of its name, after stripping all the leading directories.) +This shortcut in comparison is based upon the assumption that files +cannot have more than one base name. This is usually true, but +references to files that use symlinks or similar filesystem +facilities violate that assumption. If your program records files +using such facilities, or if you provide file names to @value{GDBN} +using symlinks etc., you can set @code{basenames-may-differ} to +@code{true} to instruct @value{GDBN} to completely canonicalize each +pair of file names it needs to compare. This will make file-name +comparisons accurate, but at a price of a significant slowdown. + +@table @code +@item set basenames-may-differ +@kindex set basenames-may-differ +Set whether a source file may have multiple base names. + +@item show basenames-may-differ +@kindex show basenames-may-differ +Show whether a source file may have multiple base names. +@end table @node Separate Debug Files @section Debugging Information in Separate Files -- cgit v1.1