From a0e9b53238c3033222c53b1654da535c0743ab6e Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Wed, 13 Jan 2016 18:27:48 +0000 Subject: Better handling of realpath() failure in windows_make_so() on Cygwin It seems Cygwin's realpath() can fail on certain DLLs (apparently some AV software prevent it working on it's DLLs; See [1], [2]). Warn rather than stopping with an error if that occurs. Based on an original patch from Tim Chick. [1] https://cygwin.com/ml/cygwin/2014-08/msg00401.html [2] https://cygwin.com/ml/cygwin/2015-11/msg00353.html gdb/ChangeLog: 2016-01-20 Jon Turney * windows-nat.c (windows_make_so): Warn rather than stopping with an error if realpath() fails. --- gdb/windows-nat.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gdb/windows-nat.c') diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 881240c..613153b 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -820,7 +820,10 @@ windows_make_so (const char *name, LPVOID load_addr) free (rname); } else - error (_("dll path too long")); + { + warning (_("dll path for \"%s\" too long or inaccessible"), name); + strcpy (so->so_name, so->so_original_name); + } } /* Record cygwin1.dll .text start/end. */ p = strchr (so->so_name, '\0') - (sizeof ("/cygwin1.dll") - 1); -- cgit v1.1