Re: [patch] Fix for PR gdb/9538 (loading of separate debuginfo and symlinks).

Jan Kratochvil
2012-01-12T23:42:58Z

On Fri, 13 Jan 2012 00:26:29 +0100, Paul Pluzhnikov wrote:
> If there was an existing HAVE_LSTAT facility, I would definitely be for
> using it here. But I am not sufficiently proficient with configury to add
> it myself.

If you find it useful here is a patch. For lstat it is AFAIK simple.

Thanks,
Jan

gdb/
2012-01-12 Jan Kratochvil <jan.kratochvil@redhat.com>

* configure.ac (AC_CHECK_FUNCS): Add lstat.
* configure: Regenerate.
* config.in: Regenerate.

--- gdb/configure.ac 4 Jan 2012 08:17:00 -0000 1.152
+++ gdb/configure.ac 12 Jan 2012 23:40:36 -0000
@@ -1059,7 +1059,7 @@ AC_CHECK_FUNCS([canonicalize_file_name r
getgid pipe poll pread64 resize_term sbrk setpgid setpgrp setsid \
sigaction sigprocmask sigsetmask socketpair syscall \
ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
- setrlimit getrlimit posix_madvise waitpid])
+ setrlimit getrlimit posix_madvise waitpid lstat])
AM_LANGINFO_CODESET

# Check the return and argument types of ptrace. No canned test for
--- gdb/configure 12 Jan 2012 23:38:47 -0000 1.337
+++ gdb/configure 12 Jan 2012 23:40:34 -0000
@@ -12918,7 +12918,7 @@ for ac_func in canonicalize_file_name re
getgid pipe poll pread64 resize_term sbrk setpgid setpgrp setsid \
sigaction sigprocmask sigsetmask socketpair syscall \
ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
- setrlimit getrlimit posix_madvise waitpid
+ setrlimit getrlimit posix_madvise waitpid lstat
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
--- gdb/config.in 12 Jan 2012 23:38:47 -0000 1.130
+++ gdb/config.in 12 Jan 2012 23:40:28 -0000
@@ -260,6 +260,9 @@
/* Define to 1 if the system has the type `long long int'. */
#undef HAVE_LONG_LONG_INT

+/* Define to 1 if you have the `lstat' function. */
+#undef HAVE_LSTAT
+
/* Define if <sys/procfs.h> has lwpid_t. */
#undef HAVE_LWPID_T