* source.c (find_and_open_source): Always rewrite absolute filenames.
authorDaniel Jacobowitz <drow@false.org>
Fri, 8 Feb 2008 22:20:48 +0000 (22:20 +0000)
committerDaniel Jacobowitz <drow@false.org>
Fri, 8 Feb 2008 22:20:48 +0000 (22:20 +0000)
gdb/ChangeLog
gdb/source.c

index ccf13dc7fa848c45a473b7ebb8f7f7c588e83a60..d936dfd3812a4d0c35baba1963c9bbe00bb78eaf 100644 (file)
@@ -1,3 +1,7 @@
+2008-02-08  Doug Evans  <dje@google.com>
+
+       * source.c (find_and_open_source): Always rewrite absolute filenames.
+
 2008-02-07  Doug Evans  <dje@google.com>
 
        * breakpoint.c: #include "hashtab.h".
index 6e2558b56c51b5987838b2685d00f9e61a9a988e..4ed4ec02cb23e0cb716d4ea89be4a527fa3123ec 100644 (file)
@@ -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)