Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » debug with Cygwin fails(Can't get debug to work with Cygwin on Windows 10)
debug with Cygwin fails [message #1774462] Sun, 15 October 2017 17:16 Go to next message
Mark Warner is currently offline Mark WarnerFriend
Messages: 4
Registered: October 2017
Junior Member
Install Eclipse Oxygen (64-bit) with latest Cygwin (64-bit) on Windows 10.
Version: Oxygen.1a Release (4.7.1a)
Build id: 20171005-1200
uname -a
CYGWIN_NT-10.0 Atreides 2.9.0(0.318/5/3) 2017-09-12 10:18 x86_64 Cygwin
gcc (GCC) 6.4.0

Made project, built code. Ran code as command line.
No problems until I tried to run debug with GDB:

Problem Occurred
Error in final launch sequence
Failed to execute MI command:
-exec-run
Error message from debugger back end:
During startup program exited with code 0xc0000135.
During startup program exited with code 0xc0000135.

GNU gdb (GDB) (Cygwin 7.12.1-2) 7.12.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
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 help, type "help".
Type "apropos word" to search for commands related to "word".
[New Thread 11680.0x1cbc]
[New Thread 11680.0x1718]
[New Thread 11680.0xa94]
[Thread 11680.0x1718 exited with code 3221225781]

Tried 3 different version of GDB with no joy.
7.12.1-2 7.10.1-1 7.9.1-1
Re: debug with Cygwin fails [message #1774544 is a reply to message #1774462] Tue, 17 October 2017 03:06 Go to previous messageGo to next message
David Vavra is currently online David VavraFriend
Messages: 627
Registered: October 2012
Senior Member
According to Microsoft, 0xc0000135. means a required DLL was not found.
https://blogs.msdn.microsoft.com/joshpoley/2011/06/13/common-process-termination-values/

Either it is missing or not in the search path.
Windows DLL search: https://msdn.microsoft.com/en-us/library/7d83bc18.aspx
Cygwin is a bit different -- more like Linux.

This may tell you what is needed:
https://stackoverflow.com/a/7378982
but it expects a Windows executable.

Or try ldd using cygwin.
https://stackoverflow.com/a/33019173

I haven't used Cygwin in a long time, so just guessing:
Try executing the built executable from a Cygwin terminal.
You may need to run Eclipse from a Cygwin terminal to get the debugger running.

Re: debug with Cygwin fails [message #1774791 is a reply to message #1774544] Thu, 19 October 2017 15:48 Go to previous messageGo to next message
Mark Warner is currently offline Mark WarnerFriend
Messages: 4
Registered: October 2017
Junior Member
According to Microsoft, 0xc0000135. means a required DLL was not found.
https://blogs.msdn.microsoft.com/joshpoley/2011/06/13/common-process-termination-values/

I actually knew this, but the point of the post is that a 'vanilla' install of eclipse with a 'vanilla' install of cygwin does not yield a working utility.
Building using the cygwin gcc was a snap, debugging was another matter.

Either it is missing or not in the search path.
Windows DLL search: https://msdn.microsoft.com/en-us/library/7d83bc18.aspx
Cygwin is a bit different -- more like Linux.

This may tell you what is needed:
https://stackoverflow.com/a/7378982
but it expects a Windows executable.

Or try ldd using cygwin.
https://stackoverflow.com/a/33019173

I tried ldd which yielded two directories:
/usr/bin ::> c:/cygwin64/bin
c:/WINDOWS/SYSTEM32
Adding them to the library directory list produced no joy.
Where do I add dll libraries for the GDB tool ?


I haven't used Cygwin in a long time, so just guessing:
Try executing the built executable from a Cygwin terminal.
You may need to run Eclipse from a Cygwin terminal to get the debugger running.

This hung at the intro window.

[Updated on: Mon, 13 November 2017 17:52]

Report message to a moderator

Re: debug with Cygwin fails [message #1774939 is a reply to message #1774791] Sun, 22 October 2017 02:54 Go to previous messageGo to next message
David Vavra is currently online David VavraFriend
Messages: 627
Registered: October 2012
Senior Member
Not sure what the problem is.
I don't have cygwin installed so I can't experiment.


I would have thought ldd would tell you the actual required dynamic libraries.
As it does in the example here: http://man7.org/linux/man-pages/man1/ldd.1.html
And not just the directories.

It's possible that the debugger requires the missing lib.

Re: debug with Cygwin fails [message #1775757 is a reply to message #1774939] Sun, 05 November 2017 17:07 Go to previous messageGo to next message
Alin Pilkington is currently offline Alin PilkingtonFriend
Messages: 5
Registered: November 2017
Junior Member
I confirm this exact same issue exists for me as well. This is on a Dell laptop with W10, plain vanilla Cygwin and Eclipse:

Version: Oxygen.1a Release (4.7.1a)
Build id: 20171005-1200

I also tried to create / debug the standard "Hello World" program and it doesn't stop at main()...zips right on through with the following output (and I had set breakpoints at the only two lines of code in main() ):

GNU gdb (GDB) (Cygwin 7.10.1-1) 7.10.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
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 "i686-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:

Find the GDB manual and other documentation resources online at:

For help, type "help".
Type "apropos word" to search for commands related to "word".
[New Thread 19900.0x5178]
[New Thread 19900.0x3aac]
[New Thread 19900.0x4454]
[Thread 19900.0x3aac exited with code 3221225781]
[Thread 19900.0x4454 exited with code 3221225781]
Re: debug with Cygwin fails [message #1776202 is a reply to message #1775757] Mon, 13 November 2017 17:43 Go to previous messageGo to next message
Mark Warner is currently offline Mark WarnerFriend
Messages: 4
Registered: October 2017
Junior Member
Cygwin 7.10.1 is the 32-bit GDB.
Eclipse is invoking 7.12.1 GDB on my 64-bit machine.

I have both the 32-bit and 64-bit versions of CYGWIN on my 64-bit machine (for software compatibility issues).

Where do you add DLL libraries for the GDB tool ?

[Updated on: Mon, 13 November 2017 17:55]

Report message to a moderator

Re: debug with Cygwin fails [message #1776204 is a reply to message #1776202] Mon, 13 November 2017 18:03 Go to previous messageGo to next message
Alin Pilkington is currently offline Alin PilkingtonFriend
Messages: 5
Registered: November 2017
Junior Member
I only have the 32 bit Cygwin installed and Eclipse recognizes the gcc toolchain so one would think it wouldn't have trouble with gdb
Re: debug with Cygwin fails [message #1776622 is a reply to message #1774462] Sat, 18 November 2017 19:04 Go to previous messageGo to next message
Alin Pilkington is currently offline Alin PilkingtonFriend
Messages: 5
Registered: November 2017
Junior Member
I tried this on a fresh Dell laptop with W10, 32 bit Cygwin install and Eclipse Oxygen.1 CDT and still have the same issue.
Re: debug with Cygwin fails [message #1776623 is a reply to message #1774462] Sat, 18 November 2017 19:04 Go to previous messageGo to next message
Alin Pilkington is currently offline Alin PilkingtonFriend
Messages: 5
Registered: November 2017
Junior Member
More info...if I invoke Eclipse from the command line using 'eclipsec.exe', I can debug fine and the debugger stops at the first line of main() as expected. Breakpoints can be set further down and they work ok also. Hmmm...

[Updated on: Sat, 18 November 2017 20:41]

Report message to a moderator

Re: debug with Cygwin fails [message #1776626 is a reply to message #1776623] Sun, 19 November 2017 01:07 Go to previous messageGo to next message
Mark Warner is currently offline Mark WarnerFriend
Messages: 4
Registered: October 2017
Junior Member
You're right !!

I can run debugging too if I invoke eclipse as a CYGWIN command line
Re: debug with Cygwin fails [message #1777624 is a reply to message #1776626] Thu, 30 November 2017 22:07 Go to previous message
Alin Pilkington is currently offline Alin PilkingtonFriend
Messages: 5
Registered: November 2017
Junior Member
Forget what I said below...I opened a DOS cmd window instead of a cygwin window by mistake. Opening a cygwin terminal window allows me to debug, set breaks, etc.

Well...scratch that. For some reason it stopped working if I invoke using eclipsec.exe. Is yours still working?

[Updated on: Thu, 30 November 2017 22:14]

Report message to a moderator

Previous Topic:Exexeutable file issues
Next Topic:Oxygen Debug Variables Disappear.
Goto Forum:
  


Current Time: Wed Dec 13 09:36:45 GMT 2017

Powered by FUDForum. Page generated in 0.02368 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software