From 014d698b35008f566973fc2fe0d4a0d3e3009a06 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 30 Jul 2004 19:17:20 +0000 Subject: * defs.h (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH): New macros. * exec.c (exec_file_attach): * nto-tdep.c (nto_find_and_open_solib): * pa64solib.c (pa64_solib_sizeof_symbol_table): * solib.c (solib_open): * somsolib.c (som_solib_sizeof_symbol_table): * source.c (is_regular_file, openp, open_source_file): * symfile.c (symfile_bfd_open): * wince.c (upload_to_device): Differentiate between the search for binary and source files. --- gdb/symfile.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'gdb/symfile.c') diff --git a/gdb/symfile.c b/gdb/symfile.c index 0e2d42c..f8c7a44 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -1222,14 +1222,15 @@ symfile_bfd_open (char *name) name = tilde_expand (name); /* Returns 1st new malloc'd copy */ /* Look down path for it, allocate 2nd new malloc'd copy. */ - desc = openp (getenv ("PATH"), 1, name, O_RDONLY | O_BINARY, 0, &absolute_name); + desc = openp (getenv ("PATH"), OPF_TRY_CWD_FIRST, name, O_RDONLY | O_BINARY, + 0, &absolute_name); #if defined(__GO32__) || defined(_WIN32) || defined (__CYGWIN__) if (desc < 0) { char *exename = alloca (strlen (name) + 5); strcat (strcpy (exename, name), ".exe"); - desc = openp (getenv ("PATH"), 1, exename, O_RDONLY | O_BINARY, - 0, &absolute_name); + desc = openp (getenv ("PATH"), OPF_TRY_CWD_FIRST, exename, + O_RDONLY | O_BINARY, 0, &absolute_name); } #endif if (desc < 0) -- cgit v1.1