* [PATCH] Better handling of realpath() failure in windows_make_so() on Cygwin
@ 2020-01-16 17:29 Jon Turney
2020-04-09 15:09 ` Jon Turney
0 siblings, 1 reply; 3+ messages in thread
From: Jon Turney @ 2020-01-16 17:29 UTC (permalink / raw)
To: gdb-patches; +Cc: Jon Turney
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.
---
Notes:
A more complex version of this patch was previously submitted as [1],
the discussion of which wandered off somewhere unproductive.
[1] https://sourceware.org/ml/gdb-patches/2016-01/msg00478.html
gdb/ChangeLog | 5 +++++
gdb/windows-nat.c | 5 ++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index be5955d379..2fcafda199 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -758,7 +758,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);
--
2.21.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Better handling of realpath() failure in windows_make_so() on Cygwin
2020-01-16 17:29 [PATCH] Better handling of realpath() failure in windows_make_so() on Cygwin Jon Turney
@ 2020-04-09 15:09 ` Jon Turney
2020-04-09 19:26 ` Simon Marchi
0 siblings, 1 reply; 3+ messages in thread
From: Jon Turney @ 2020-04-09 15:09 UTC (permalink / raw)
To: gdb-patches
On 16/01/2020 17:27, Jon Turney wrote:
> 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.
Ping.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Better handling of realpath() failure in windows_make_so() on Cygwin
2020-04-09 15:09 ` Jon Turney
@ 2020-04-09 19:26 ` Simon Marchi
0 siblings, 0 replies; 3+ messages in thread
From: Simon Marchi @ 2020-04-09 19:26 UTC (permalink / raw)
To: Jon Turney, gdb-patches
On 2020-04-09 11:09 a.m., Jon Turney wrote:
> On 16/01/2020 17:27, Jon Turney wrote:
>> 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.
>
> Ping.
>
Thanks, this is OK.
Simon
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-09 19:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-16 17:29 [PATCH] Better handling of realpath() failure in windows_make_so() on Cygwin Jon Turney
2020-04-09 15:09 ` Jon Turney
2020-04-09 19:26 ` Simon Marchi
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).