* source.c (find_and_open_source): Try rewriting the source
path inside filename if dirname is NULL.
This commit is contained in:
parent
3ba257ccb2
commit
56163ce1d3
2 changed files with 17 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2007-01-24 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
|
* source.c (find_and_open_source): Try rewriting the source
|
||||||
|
path inside filename if dirname is NULL.
|
||||||
|
|
||||||
2007-01-24 Joel Brobecker <brobecker@adacore.com>
|
2007-01-24 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
* dwarf2read.c (add_partial_symbol): Create an extra partial
|
* dwarf2read.c (add_partial_symbol): Create an extra partial
|
||||||
|
|
12
gdb/source.c
12
gdb/source.c
|
@ -1001,6 +1001,18 @@ find_and_open_source (struct objfile *objfile,
|
||||||
strcat (path + len, source_path + len + cdir_len); /* After $cdir */
|
strcat (path + len, source_path + len + cdir_len); /* After $cdir */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* If dirname is NULL, chances are the path is embedded in
|
||||||
|
the filename. Try the source path substitution on it. */
|
||||||
|
char *rewritten_filename = rewrite_source_path (filename);
|
||||||
|
|
||||||
|
if (rewritten_filename != NULL)
|
||||||
|
{
|
||||||
|
make_cleanup (xfree, rewritten_filename);
|
||||||
|
filename = rewritten_filename;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
result = openp (path, OPF_SEARCH_IN_PATH, filename, OPEN_MODE, 0, fullname);
|
result = openp (path, OPF_SEARCH_IN_PATH, filename, OPEN_MODE, 0, fullname);
|
||||||
if (result < 0)
|
if (result < 0)
|
||||||
|
|
Loading…
Add table
Reference in a new issue