aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2014-11-06 20:34:28 +0800
committerYao Qi <yao@codesourcery.com>2014-11-28 18:38:02 +0800
commit3332aaf2896b3218a131eab5976a500bb46d6ac3 (patch)
tree8f5a64f6dcca3c89cb6faf56b4d805e953b83081
parentf45c62c4d5afa794d061199b6b4e585d509d1040 (diff)
downloadgdb-3332aaf2896b3218a131eab5976a500bb46d6ac3.zip
gdb-3332aaf2896b3218a131eab5976a500bb46d6ac3.tar.gz
gdb-3332aaf2896b3218a131eab5976a500bb46d6ac3.tar.bz2
Use lstat unconditionally
Since lstat gnulib module is imported, we can use it unconditionally. lstat usage was introduced by this patch https://sourceware.org/ml/gdb-patches/2012-01/msg00390.html during the review, it was suggested to import gnulib lstat module, but we didn't do that. gdb: 2014-11-28 Yao Qi <yao@codesourcery.com> * configure.ac (AC_CHECK_FUNCS): Remove lstat. * config.in, configure: Regenerate. * symfile.c (find_separate_debug_file_by_debuglink): Remove code checking HAVE_LSTAT is defined.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/config.in3
-rwxr-xr-xgdb/configure2
-rw-r--r--gdb/configure.ac2
-rw-r--r--gdb/symfile.c2
5 files changed, 9 insertions, 7 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3151d59..f824ff3 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
2014-11-28 Yao Qi <yao@codesourcery.com>
+ * configure.ac (AC_CHECK_FUNCS): Remove lstat.
+ * config.in, configure: Regenerate.
+ * symfile.c (find_separate_debug_file_by_debuglink): Remove
+ code checking HAVE_LSTAT is defined.
+
+2014-11-28 Yao Qi <yao@codesourcery.com>
+
* gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
lstat.
* gnulib/aclocal.m4: Re-generated.
diff --git a/gdb/config.in b/gdb/config.in
index 80b988b..8c5a710 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -225,9 +225,6 @@
/* Define to 1 if the compiler supports long double. */
#undef HAVE_LONG_DOUBLE
-/* Define to 1 if you have the `lstat' function. */
-#undef HAVE_LSTAT
-
/* Define if <sys/procfs.h> has lwpid_t. */
#undef HAVE_LWPID_T
diff --git a/gdb/configure b/gdb/configure
index e1c0a10..0c04eba 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -10483,7 +10483,7 @@ for ac_func in canonicalize_file_name realpath getrusage getuid getgid \
sbrk setpgid setpgrp setsid \
sigaction sigprocmask sigsetmask socketpair \
ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
- setrlimit getrlimit posix_madvise waitpid lstat \
+ setrlimit getrlimit posix_madvise waitpid \
ptrace64 sigaltstack
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
diff --git a/gdb/configure.ac b/gdb/configure.ac
index bcf1ef2..f8c32ad 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1309,7 +1309,7 @@ AC_CHECK_FUNCS([canonicalize_file_name realpath getrusage getuid getgid \
sbrk setpgid setpgrp setsid \
sigaction sigprocmask sigsetmask socketpair \
ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
- setrlimit getrlimit posix_madvise waitpid lstat \
+ setrlimit getrlimit posix_madvise waitpid \
ptrace64 sigaltstack])
AM_LANGINFO_CODESET
GDB_AC_COMMON
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 29877ec..a09ebe6 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -1591,7 +1591,6 @@ find_separate_debug_file_by_debuglink (struct objfile *objfile)
if (debugfile == NULL)
{
-#ifdef HAVE_LSTAT
/* For PR gdb/9538, try again with realpath (if different from the
original). */
@@ -1618,7 +1617,6 @@ find_separate_debug_file_by_debuglink (struct objfile *objfile)
}
}
}
-#endif /* HAVE_LSTAT */
}
do_cleanups (cleanups);