summaryrefslogtreecommitdiff
path: root/gdb/source.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2013-02-03 15:54:14 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2013-02-03 15:54:14 +0000
commitbfacf227ec8ee6b1c73311e323bd93c1eddd9ca6 (patch)
tree68a8a4501468b940a3db64cd85d48612b9ba3d25 /gdb/source.c
parentc2f14511388ab029f3bda0f5227eab67e04daac5 (diff)
downloadgdb-bfacf227ec8ee6b1c73311e323bd93c1eddd9ca6.tar.gz
gdb/
Replace xfullpath calls by gdb_realpath calls. * cli/cli-cmds.c (find_and_open_script): Remove xfullpath from the function comment. * dwarf2read.c (dw2_map_expand_apply): Remove parameter full_path. Remove it from the iterate_over_some_symtabs call. (dw2_map_symtabs_matching_filename): Remove parameter full_path. Remove it from the dw2_map_expand_apply calls, remove a block handling it. * psymtab.c (partial_map_expand_apply): Remove parameter full_path. Remove it from the iterate_over_some_symtabs call. (partial_map_symtabs_matching_filename): Remove parameter full_path. Remove it from the partial_map_expand_apply calls, remove a block handling it. Drop gdb_realpath call and cleanups from the real_path handling. * source.c (openp): Drop the comment part about xfullpath. Replace xfullpath calls by gdb_realpath calls. (find_and_open_source): Replace xfullpath call by gdb_realpath call. * symfile.h (struct quick_symbol_functions): Remove parameter full_path from method map_symtabs_matching_filename and its comment. * symmisc.c (maintenance_print_msymbols): Replace xfullpath call by gdb_realpath call. * symtab.c (iterate_over_some_symtabs): Remove parameter full_path, remove it also from the function comment, remove a block handling it. Drop gdb_realpath call and cleanups from the real_path handling. (iterate_over_symtabs): Drop variable full_path and its use. * symtab.h (iterate_over_some_symtabs): Remove parameter full_path. * utils.c (xfullpath): Remove. * utils.h (xfullpath): Remove. gdb/testsuite/ * gdb.gdb/xfullpath.exp: Replace xfullpath calls by gdb_realpath calls.
Diffstat (limited to 'gdb/source.c')
-rw-r--r--gdb/source.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/gdb/source.c b/gdb/source.c
index 54d569331b3..13cc7c86aa1 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -825,15 +825,11 @@ openp (const char *path, int opts, const char *string,
done:
if (filename_opened)
{
- /* If a file was opened, canonicalize its filename. Use xfullpath
- rather than gdb_realpath to avoid resolving the basename part
- of filenames when the associated file is a symbolic link. This
- fixes a potential inconsistency between the filenames known to
- GDB and the filenames it prints in the annotations. */
+ /* If a file was opened, canonicalize its filename. */
if (fd < 0)
*filename_opened = NULL;
else if (IS_ABSOLUTE_PATH (filename))
- *filename_opened = xfullpath (filename);
+ *filename_opened = gdb_realpath (filename);
else
{
/* Beware the // my son, the Emacs barfs, the botch that catch... */
@@ -843,7 +839,7 @@ done:
? "" : SLASH_STRING,
filename, (char *)NULL);
- *filename_opened = xfullpath (f);
+ *filename_opened = gdb_realpath (f);
xfree (f);
}
}
@@ -986,9 +982,7 @@ find_and_open_source (const char *filename,
result = open (*fullname, OPEN_MODE);
if (result >= 0)
{
- /* Call xfullpath here to be consistent with openp
- which we use below. */
- char *lpath = xfullpath (*fullname);
+ char *lpath = gdb_realpath (*fullname);
xfree (*fullname);
*fullname = lpath;