User forums > Using Code::Blocks

C::B new releases hung on linkage in cygwin

<< < (6/6)

littlegene:

--- Quote from: MortenMacFly on September 21, 2012, 07:29:21 pm ---...btw: I can debug anything compiled with Cygwin just fine (on windows). hence I am using a proper non-makefile based project file and the default debugger. I just set a BP in your (Cygwin based) hello world app and it stopped there just fine.

--- End quote ---
I bet... you dont' use WIN 7... On XP C::B is just fine on debug cygwin programs. And it always was capable.
On windows 7 CBplugin (or so) still can't sync  BP with the point in editor and can't open the file in editor.
Without a patch. (I am not presenting here the patch because i use it for me, with no taking into accont all other debuggers can be, besides cygwin, because I NEVER use or used mingw at all)

The main difference (Win XP vs Win 7 on recent cygwin 1.7.16 and recent C::B v.8401) in the both full debugger's logs:

[debug][New Thread 2804.0x850]
[debug][New Thread 2804.0xe8c]
[debug]Breakpoint 1, main () at c:/test1/test1/main.cpp:7
[debug]/cygdrive/c/test1/test1/main.cpp:7:62:beg:0x40117e
[debug]>>>>>>cb_gdb:

At c:/test1/test1/main.cpp:7

against:

[debug][New Thread 2420.0x990]
[debug][New Thread 2420.0xd04]
[debug]Breakpoint 1, main () at C:/test1/main.cpp:7
[debug]/cygdrive/c/test1/main.cpp:7:62:beg:0x40117e
[debug]>>>>>>cb_gdb:

Cannot open file: /cygdrive/c/test1/main.cpp
At /cygdrive/c/test1/main.cpp:7

stahta01:
FYI:

I just tried to debug Cygwin using MinGW GDB.exe (Debugger name and version: GNU gdb (GDB) 7.4) and it worked under Windows 7 32 bit.
Note: I do not normally use the debugger, so the only thing I tested is that it stopped on a break point.
I did see that Cygwin GDB.exe failed to stop on a break point.

CB Self built against wx 2.9 truck; CB SVN 8404.

I am now updating Cygwin to see if that breaks it.



Tim S.

littlegene:

--- Quote from: stahta01 on September 23, 2012, 09:07:08 am ---I did see that Cygwin GDB.exe failed to stop on a break point.

--- End quote ---
Here is how you can avoid it and force BP be established

1. If your recent cygwin (1.7.16, from 20 july 2012  - check "uname -a") is on the C DISK (C:\CYGWIN), then
place your cygwin project on the other disk, say D: (ex: D:\somedir\someproj\....)

2. If your recent cygwin (1.7.16, from 20 july 2012  - check "uname -a") is on the D DISK (D:\CYGWIN), then
place your cygwin project on the other disk, say C: (ex: C:\somedir\someproj\....)

Then rebuild the program and after that debugging will work.

In other words - a project to debug should lay on the other logical(or phisical) disk than the Cygwin deploy folder...
It is a bug of cygwin, not even discussed so far on cygwin forums, because they IGNORE this notice conserning to this bug...


*BUT* Keep in mind, that after BP in cygwin debug is fired, you could check in C::B (what I wrote about) that:

Cannot open file: /cygdrive/c/test1/main.cpp
At /cygdrive/c/test1/main.cpp:7


As you can see ("At /cygdrive/c/test1/main.cpp:7") BP is workable, but C::B opening of source file break. (Win7 only)

Navigation

[0] Message Index

[*] Previous page

Go to full version