aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2013-09-04 20:09:39 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2013-09-04 20:09:39 +0000
commit492c0ab72a050a19d09d0df16eb3b0d8da22be1a (patch)
treefe7dc9a2a9b6ad41a2bd663c1c6b951d115cc001 /gdb/solib.c
parent23a44de8103159b27793ce556932619ed6cc6b01 (diff)
downloadgdb-492c0ab72a050a19d09d0df16eb3b0d8da22be1a.zip
gdb-492c0ab72a050a19d09d0df16eb3b0d8da22be1a.tar.gz
gdb-492c0ab72a050a19d09d0df16eb3b0d8da22be1a.tar.bz2
Code cleanup: Change OPF_DISABLE_REALPATH to OPF_RETURN_REALPATH.
gdb/ 2013-09-04 Jan Kratochvil <jan.kratochvil@redhat.com> Code cleanup: Change OPF_DISABLE_REALPATH to OPF_RETURN_REALPATH. * cli/cli-cmds.c (find_and_open_script): Add OPF_RETURN_REALPATH to variable search_flags. * defs.h (OPF_DISABLE_REALPATH): Rename to ... (OPF_RETURN_REALPATH): ... here. * dwarf2read.c (try_open_dwop_file): Set OPF_RETURN_REALPATH for flags. * exec.c (exec_file_attach): Remove OPF_DISABLE_REALPATH from openp call. Twice. * nto-tdep.c (nto_find_and_open_solib): Add OPF_RETURN_REALPATH for openp call. * solib.c (solib_find): Likewise. Four times. * source.c (openp): Change OPF_DISABLE_REALPATH to OPF_RETURN_REALPATH in the function comment and for the realpath_fptr variable. (source_full_path_of): Add OPF_RETURN_REALPATH for openp call. (find_and_open_source): Likewise. Twice. * symfile.c (symfile_bfd_open): Likewise, also twice.
Diffstat (limited to 'gdb/solib.c')
-rw-r--r--gdb/solib.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gdb/solib.c b/gdb/solib.c
index fd26687..5456d6f 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -319,14 +319,16 @@ solib_find (char *in_pathname, int *fd)
/* If not found, search the solib_search_path (if any). */
if (found_file < 0 && solib_search_path != NULL)
- found_file = openp (solib_search_path, OPF_TRY_CWD_FIRST,
+ found_file = openp (solib_search_path,
+ OPF_TRY_CWD_FIRST | OPF_RETURN_REALPATH,
in_pathname, O_RDONLY | O_BINARY, &temp_pathname);
/* If not found, next search the solib_search_path (if any) for the basename
only (ignoring the path). This is to allow reading solibs from a path
that differs from the opened path. */
if (found_file < 0 && solib_search_path != NULL)
- found_file = openp (solib_search_path, OPF_TRY_CWD_FIRST,
+ found_file = openp (solib_search_path,
+ OPF_TRY_CWD_FIRST | OPF_RETURN_REALPATH,
target_lbasename (fskind, in_pathname),
O_RDONLY | O_BINARY, &temp_pathname);
@@ -339,16 +341,16 @@ solib_find (char *in_pathname, int *fd)
if (found_file < 0 && gdb_sysroot_is_empty)
found_file = openp (get_in_environ (current_inferior ()->environment,
"PATH"),
- OPF_TRY_CWD_FIRST, in_pathname, O_RDONLY | O_BINARY,
- &temp_pathname);
+ OPF_TRY_CWD_FIRST | OPF_RETURN_REALPATH, in_pathname,
+ O_RDONLY | O_BINARY, &temp_pathname);
/* If not found, next search the inferior's $LD_LIBRARY_PATH
environment variable. */
if (found_file < 0 && gdb_sysroot_is_empty)
found_file = openp (get_in_environ (current_inferior ()->environment,
"LD_LIBRARY_PATH"),
- OPF_TRY_CWD_FIRST, in_pathname, O_RDONLY | O_BINARY,
- &temp_pathname);
+ OPF_TRY_CWD_FIRST | OPF_RETURN_REALPATH, in_pathname,
+ O_RDONLY | O_BINARY, &temp_pathname);
*fd = found_file;
return temp_pathname;