Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: Léa Massiot on August 29, 2012, 11:57:24 am

Title: C::B / CYGWIN / gdb / No stop at breakpoints
Post by: Léa Massiot on August 29, 2012, 11:57:24 am
Hello and thank you for reading my post.

Here is my problem.
- My OS is "Win7".
- I'm using "C::B 10.05".
- I have "CYGWIN" installed on my computer.
- I chose to use the CYGWIN's compiler, linker and debbuger along with "C::B".
- I created a basic "Hello World" "Console Application" and toggled a breakpoint:
so normally, I would expect the program to stop before printing "Hello World" on the console
and after I hit "F7", it would print it etc.
No such a thing happens.

I can properly build and run my program but I can't debug it: it doesn't stop at breakpoints.

In the "Debbuger" tab, I get such messages as:
(My "C::B" workspace directory is D:\some\directory\in\my\filesystem\cbproject\)
Code
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.5.50.20120815-cvs (cygwin-special)
Warning: /cygdrive/d/some/directory/in/my/filesystem/cbproject/D: No such file or directory.

At /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/iostream:77
Cannot open file: D:\some\directory\in\my\filesystem\cbproject\->->\cygdrive\d\some\directory\in\my\filesystem\cbproject\main.cpp

How can I fix this problem?
It looks like a path isn't set properly...

Thank you for helping.
Best regards.
Title: Re: C::B / CYGWIN / gdb / No stop at breakpoints
Post by: Léa Massiot on August 29, 2012, 01:55:03 pm
This thread http://forums.codeblocks.org/index.php/topic,12212.0.html doesn't solve the problem for me, unfortunately.
Title: Re: C::B / CYGWIN / gdb / No stop at breakpoints
Post by: Léa Massiot on August 30, 2012, 11:38:49 am
In my system ("Win7"), the "cygpath.exe" command default setting is to print "Unix form of NAMEs (/cygdrive/c/winnt)"
instead of "Windows form of NAMEs (C:\WINNT)"...
... so maybe the problem comes from here.
For example:
Code
dos shell> cygpath C:\Users\lea
/cygdrive/c/Users/lea

dos shell> cygpath -w C:\Users\lea
C:\Users\lea

BR.
Title: Re: C::B / CYGWIN / gdb / No stop at breakpoints
Post by: Léa Massiot on August 31, 2012, 12:26:07 pm
I followed these instructions step by step:
http://wiki.codeblocks.org/index.php?title=Installing_Cygwin_Compiler
it doesn't work either.

BR.
Title: Re: C::B / CYGWIN / gdb / No stop at breakpoints
Post by: Léa Massiot on August 31, 2012, 12:30:48 pm
I there anything I could do in

"Settings"
-> "Compiler and debugger..."
-> "Debbuger settings"
-> "Debugger initialization commands"

?
Title: Re: C::B / CYGWIN / gdb / No stop at breakpoints
Post by: Léa Massiot on August 31, 2012, 03:03:56 pm
Switched to MinGW.
Title: Re: C::B / CYGWIN / gdb / No stop at breakpoints
Post by: ollydbg on August 31, 2012, 04:19:21 pm
I don't use cygwin, here is my suggestion:

To use cygwin-gdb, you may need to hack the source code of debugger plugin, especially the file path handling, you should convert the cygwin style path to/back windows style. :)
Title: Re: C::B / CYGWIN / gdb / No stop at breakpoints
Post by: Léa Massiot on September 03, 2012, 10:06:12 am
Thank you for your answer. I'm sorry: I've no time for this, I'm just a simple user.
Best regards.
BTW: this thread made me decide to switch to "MinGW" (which I knew was working on my previous computer):
http://forums.codeblocks.org/index.php/topic,15852.0.html