From e6c48ebd22a2962c35d26908180db876839eafa8 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Fri, 8 Feb 2008 22:20:48 +0000 Subject: * source.c (find_and_open_source): Always rewrite absolute filenames. --- gdb/source.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'gdb/source.c') 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) -- cgit v1.2.1