This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Don't lose compilation directory in Dwarf2 line-tables
On Fri, 2006-04-14 at 11:44 +0300, Eli Zaretskii wrote:
> In addition, I think the current algorithm for searching the sources
> is described in the user's manual; please see if there's something in
> that description that needs to be updated with your changes.
I looked at it (7.4 Specifying source directories). The algorithm that
is described is the one in lookup_(partial_)symtab, and I don't think
I'll change that (my patch only modifies the dwarf2 line-info reading).
While reading that part, I think that I spotted a very minor issue. One
sentence there reads :
 Note that the executable search path is not used to locate the source
ïles. Neither is the current working directory, unless it happens to be
in the source path. Â
Which isn't false, but I don't think that the user has the ability to
specify an empty source path, it at least always contains $cdir and
$cwd. This means that the current working directory will always be used
to locate source files.
Also there are 2 mentions below that to 'resetting the source path to
empty', but as I said, the source path is never really empty.
If I'm not mistaken and if its not too much nitpicking, shall I commit
something like the attached patch?
2006-04-14 Frederic Riss <frederic.riss@st.com>
* gdb.texinfo (Specifying source directories): Update the description
of the source file search to reflect the fact that the source path
always contains at least $cdir and $cwd.
--- gdb.texinfo.orig 2006-04-14 13:18:53.000000000 +0200
+++ gdb.texinfo 2006-04-14 13:34:08.000000000 +0200
@@ -5005,8 +5005,7 @@
that---@file{/mnt/cross/foo.c}.
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.
+source files.
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
@@ -5048,7 +5047,7 @@
directory at the time you add an entry to the source path.
@item directory
-Reset the source path to empty again. This requires confirmation.
+Reset the source path to its initial value. This requires confirmation.
@c RET-repeat for @code{directory} is explicitly disabled, but since
@c repeating it would be a no-op we do not say that. (thanks to RMS)
@@ -5064,7 +5063,7 @@
@enumerate
@item
-Use @code{directory} with no argument to reset the source path to empty.
+Use @code{directory} with no argument to reset the source path to its initial value.
@item
Use @code{directory} with suitable arguments to reinstall the