summaryrefslogtreecommitdiff
path: root/gdb/source.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2008-02-08 22:20:48 +0000
committerDaniel Jacobowitz <dan@debian.org>2008-02-08 22:20:48 +0000
commite6c48ebd22a2962c35d26908180db876839eafa8 (patch)
treeafe4de9057c6c21bf21428fce4897a91744e6e4d /gdb/source.c
parentfbeffd3483705c04f6958454cc169cf318ff16f4 (diff)
downloadgdb-e6c48ebd22a2962c35d26908180db876839eafa8.tar.gz
* source.c (find_and_open_source): Always rewrite absolute filenames.
Diffstat (limited to 'gdb/source.c')
-rw-r--r--gdb/source.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/source.c b/gdb/source.c
index 6e2558b56c5..4ed4ec02cb2 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -999,10 +999,11 @@ find_and_open_source (struct objfile *objfile,
strcat (path + len, source_path + len + cdir_len); /* After $cdir */
}
}
- else
+
+ if (IS_ABSOLUTE_PATH (filename))
{
- /* If dirname is NULL, chances are the path is embedded in
- the filename. Try the source path substitution on it. */
+ /* If filename is absolute path, try the source path
+ substitution on it. */
char *rewritten_filename = rewrite_source_path (filename);
if (rewritten_filename != NULL)