From patchwork Wed Nov 26 05:46:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 3932 Received: (qmail 21283 invoked by alias); 26 Nov 2014 05:46:52 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 21232 invoked by uid 89); 26 Nov 2014 05:46:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 26 Nov 2014 05:46:50 +0000 Received: from svr-orw-fem-05.mgc.mentorg.com ([147.34.97.43]) by relay1.mentorg.com with esmtp id 1XtVRB-0005N4-DG from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Tue, 25 Nov 2014 21:46:49 -0800 Received: from qiyao.dyndns.org.com (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.3.181.6; Tue, 25 Nov 2014 21:46:48 -0800 From: Yao Qi To: Subject: [PATCH 4/7] Use lstat unconditionally Date: Wed, 26 Nov 2014 13:46:37 +0800 Message-ID: <1416980800-21408-5-git-send-email-yao@codesourcery.com> In-Reply-To: <1416980800-21408-1-git-send-email-yao@codesourcery.com> References: <1416980800-21408-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 X-IsSubscribed: yes 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-26 Yao Qi * 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. --- gdb/config.in | 3 --- gdb/configure | 2 +- gdb/configure.ac | 2 +- gdb/symfile.c | 2 -- 4 files changed, 2 insertions(+), 7 deletions(-) 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 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);