This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdb 7.8 consistently fails to run executable - error is


Hi,

I'm reacting to this email with a long delay but I just wanted to let you
know that this change saved my life, now I am finally able to debug again
with cygwin (w7 64bits , 32 bits cygwin) because I was blocked by a nasty
"security" dll (part of Arkoon Security). A big thank you...

Additionally I had another problem in gdb which is detecting kernel64.dll
instead of kernel32.dll : am I the only one still using Cygwin 32 on
Windows 64? Does this rings a bell for anyone?

I had to add another (uggly) patch above Tim's work, see below :

diff -ru origsrc/gdb-7.8/gdb/windows-nat.c src/gdb-7.8/gdb/windows-nat.c
--- origsrc/gdb-7.8/gdb/windows-nat.c   2015-06-23 17:44:40.862022600 +0200
+++ src/gdb-7.8/gdb/windows-nat.c       2015-11-25 13:28:46.893554500 +0100
@@ -648,6 +648,14 @@
   buf[0] = 0;
   if (access (name, F_OK) != 0)
     {
+      char *found=strstr(name,"kernel64.dll");
+DEBUG_EVENTS (("gdb: access() failed for \"%s\"\n", name));
+      if (found)
+         {
+                 char *six=strchr(found,'6');
+                 *six++ = '3';
+                 *six= '2';
+         }
       if (strcasecmp (name, "ntdll.dll") == 0)
 #ifdef __USEWIDE
        {
@@ -681,7 +689,7 @@
          free (rname);
        }
       else
-       error (_("dll path too long"));
+       warning (_("dll path too long, or can not be accessed: %s -
%s"),name,rname);
     }
   /* Record cygwin1.dll .text start/end.  */
   p = strchr (so->so_name, '\0') - (sizeof ("/cygwin1.dll") - 1);


2015-11-23 15:44 GMT+01:00 Tim Chick <chick@computergeek.freeserve.co.uk>:
> Hi Dominik,
>
> In my case, it was not down to the string size being too small. I seemed to
> suffer exactly the same problem.
>
> You get the same error if Windows can't access the dll. This seems to happen
> for some "special" dlls.
>
> The size of any PATH variable won't matter - the path it refers to here is
> the "realpath" conversion of the dll filename.
>
> The simple patch applied makes gdb work for me on Windows 7.
>
> workaround_win7_dll_path_too_long.patch
> <http://cygwin.1069669.n5.nabble.com/file/n122909/workaround_win7_dll_path_too_long.patch>
>
> Patch also below:
>
> --- gdb-7.9.1-1.src/gdb.i686/src/gdb-7.9.1/gdb/windows-nat.c.orig       2015-11-23
> 11:43:17.834000000 +0000
> +++ gdb-7.9.1-1.src/gdb.i686/src/gdb-7.9.1/gdb/windows-nat.c    2015-11-23
> 14:17:30.302252500 +0000
> @@ -623,7 +623,8 @@ windows_make_so (const char *name, LPVOI
>           free (rname);
>         }
>        else
> -       error (_("dll path too long"));
> +          warning (_("dll path too long, or can not be accessed '\"%s\"'"),
> +                   name);
>      }
>    /* Record cygwin1.dll .text start/end.  */
>    p = strchr (so->so_name, '\0') - (sizeof ("/cygwin1.dll") - 1);
>
>
> Thanks,
> Tim
>
>
>
>
> --
> View this message in context: http://cygwin.1069669.n5.nabble.com/gdb-7-8-consistently-fails-to-run-executable-error-is-dll-path-too-long-tp110722p122909.html
> Sent from the Cygwin list mailing list archive at Nabble.com.
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]