public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Better handling of realpath() failure in windows_make_so() on Cygwin
@ 2020-04-15 14:07 Jon TURNEY
0 siblings, 0 replies; only message in thread
From: Jon TURNEY @ 2020-04-15 14:07 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a0e9b53238c3033222c53b1654da535c0743ab6e
commit a0e9b53238c3033222c53b1654da535c0743ab6e
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Wed Jan 13 18:27:48 2016 +0000
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 <jon.turney@dronecode.org.uk>
* windows-nat.c (windows_make_so): Warn rather than stopping with
an error if realpath() fails.
Diff:
---
gdb/ChangeLog | 5 +++++
gdb/windows-nat.c | 5 ++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8998636a1d7..425c4459922 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2016-01-20 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * windows-nat.c (windows_make_so): Warn rather than stopping with
+ an error if realpath() fails.
+
2020-04-14 Kamil Rytarowski <n54@gmx.com>
* nbsd-nat.c (nbsd_pid_to_kinfo_proc2): New.
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 881240c6934..613153bfac6 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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-04-15 14:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-15 14:07 [binutils-gdb] Better handling of realpath() failure in windows_make_so() on Cygwin Jon TURNEY
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).