public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Carter, Mark Andrew (Andy)" <andy.carter@flightsafety.com>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Cc: "Hortenstine, John" <john.hortenstine@flightsafety.com>
Subject: gdb symbolic link bug
Date: Fri, 19 Nov 2021 15:08:54 +0000	[thread overview]
Message-ID: <7260a5386b514d2c83db0e6bfa431f5c@v0001wsxm02.flightsafety.com> (raw)

Gdb will not run an executable when it is a symbolic link in the post Cygwin release 3.1.5 form.  As seen below I am currently running Cygwin 3.1.7.  I have confirmed this is due to the change of the "ln -s" implementation.  Links created by Cygwin 2.8 and 3.1.0 work with this gdb version, and links created with Cygwin 3.1.7 do not work with gdb from Cygwin release 2.8.  The following capture demonstrates the issue.  Note the workaround using readlink!

$ uname -a
CYGWIN_NT-10.0 P1163-8573-10 3.1.7(0.340/5/3) 2020-08-22 17:48 x86_64 Cygwin

$ ls -l vital.exe
lrwxrwxrwx 1 p00002737 Domain Users 18 Oct 19 06:59 vital.exe -> ../vital/vital.exe

$ gdb vital.exe
GNU gdb (GDB) (Cygwin 8.2.1-1) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from vital.exe...done.
(gdb) r
Starting program: /home/p00002737/vital/tap/vital.exe
Error creating process /home/p00002737/vital/tap/vital.exe, (error 1920).
(gdb) quit

$ gdb `readlink vital.exe`
GNU gdb (GDB) (Cygwin 8.2.1-1) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ../vital/vital.exe...done.
(gdb) r
Starting program: /home/p00002737/vital/vital/vital.exe
[New Thread 54032.0xc1e8]
[New Thread 54032.0x10e4]
[New Thread 54032.0xdee8]
[New Thread 54032.0xcd20]
[New Thread 54032.0x8e60]
[New Thread 54032.0xc378]

Thread 6 received signal SIGINT, Interrupt.
[Switching to Thread 54032.0xc378]
0x00007fff3b4b5a03 in TlsGetValue () from /cygdrive/c/WINDOWS/System32/KERNELBASE.dll
(gdb)

             reply	other threads:[~2021-11-19 15:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-19 15:08 Carter, Mark Andrew (Andy) [this message]
2021-11-20  0:55 ` Brian Inglis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7260a5386b514d2c83db0e6bfa431f5c@v0001wsxm02.flightsafety.com \
    --to=andy.carter@flightsafety.com \
    --cc=cygwin@cygwin.com \
    --cc=john.hortenstine@flightsafety.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).