From: Daniel Jacobowitz Date: Fri, 8 Feb 2008 22:20:48 +0000 (+0000) Subject: * source.c (find_and_open_source): Always rewrite absolute filenames. X-Git-Tag: gdb_6_8-2008-02-26-branchpoint~156 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8da2a1df1661ca37851fd21c1dda16d433a5811a;p=thirdparty%2Fbinutils-gdb.git * source.c (find_and_open_source): Always rewrite absolute filenames. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ccf13dc7fa8..d936dfd3812 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2008-02-08 Doug Evans + + * source.c (find_and_open_source): Always rewrite absolute filenames. + 2008-02-07 Doug Evans * breakpoint.c: #include "hashtab.h". 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)