aboutsummaryrefslogtreecommitdiff
path: root/gdb/source.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2008-02-08 22:20:48 +0000
committerDaniel Jacobowitz <drow@false.org>2008-02-08 22:20:48 +0000
commit8da2a1df1661ca37851fd21c1dda16d433a5811a (patch)
tree9b2adff626951f18d2f3389ce576739d68db28bd /gdb/source.c
parentd51c30157c2ec626c7eb7a21f3b8199698e38e16 (diff)
downloadgdb-8da2a1df1661ca37851fd21c1dda16d433a5811a.zip
gdb-8da2a1df1661ca37851fd21c1dda16d433a5811a.tar.gz
gdb-8da2a1df1661ca37851fd21c1dda16d433a5811a.tar.bz2
* 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 6e2558b..4ed4ec0 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)