From: Baurjan Ismagulov <ibr@ata.cs.hun.edu.tr>
To: gdb-patches@sources.redhat.com
Subject: Re: handling of absolute source file paths
Date: Sat, 01 May 2004 17:12:00 -0000 [thread overview]
Message-ID: <20040501171420.GB21679@ata.cs.hun.edu.tr> (raw)
In-Reply-To: <ud661962c.fsf@elta.co.il>
[-- Attachment #1: Type: text/plain, Size: 546 bytes --]
Hello, Eli!
On Wed, Apr 21, 2004 at 08:51:55AM +0200, Eli Zaretskii wrote:
> Note that it doesn't specify what happens if the file's name starts
> with a slash or otherwise has leading directories. It would be good
> to augment the manual with a more explicit description of cases such
> as yours. Would you like to do that?
I've tried to do that. I've removed a paragraph that seemed no longer
relevant. Please review.
* gdb.texinfo (Specifying source directories): Add an example
for the 'directory' command.
With kind regards,
Baurjan.
[-- Attachment #2: src-ibr-doc_search-20040501-1848.diff --]
[-- Type: text/plain, Size: 1971 bytes --]
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
next prev parent reply other threads:[~2004-05-01 17:12 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-20 15:49 Baurjan Ismagulov
2004-04-21 5:51 ` Eli Zaretskii
2004-04-21 11:10 ` Baurjan Ismagulov
2004-05-01 17:01 ` Baurjan Ismagulov
2004-05-02 13:15 ` Eli Zaretskii
2004-05-01 17:12 ` Baurjan Ismagulov [this message]
2004-05-01 18:11 ` Eli Zaretskii
2004-05-08 21:20 ` Baurjan Ismagulov
2004-05-09 14:33 ` Eli Zaretskii
2004-05-09 13:53 ` Baurjan Ismagulov
2004-05-11 16:08 ` Eli Zaretskii
2004-07-17 18:20 ` Baurjan Ismagulov
2004-07-23 19:55 ` ping: " Baurjan Ismagulov
2004-07-24 7:21 ` Eli Zaretskii
2004-07-26 14:57 ` Andrew Cagney
2004-07-26 15:20 ` Baurjan Ismagulov
2004-07-26 17:48 ` Eli Zaretskii
2004-07-26 18:15 ` Andrew Cagney
2004-07-26 17:47 ` Eli Zaretskii
2004-07-30 19:19 ` Eli Zaretskii
2004-07-31 7:57 ` Baurjan Ismagulov
2004-07-31 8:25 ` Eli Zaretskii
2004-08-01 19:31 ` Andrew Cagney
2004-08-03 16:59 ` Baurjan Ismagulov
2004-08-03 19:12 ` Eli Zaretskii
2004-08-04 7:02 ` Baurjan Ismagulov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040501171420.GB21679@ata.cs.hun.edu.tr \
--to=ibr@ata.cs.hun.edu.tr \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox