News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

C::B / CYGWIN / gdb / No stop at breakpoints

Started by Léa Massiot, August 29, 2012, 11:57:24 AM

Previous topic - Next topic

Léa Massiot

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\)
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.

Léa Massiot


Léa Massiot

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:
dos shell> cygpath C:\Users\lea
/cygdrive/c/Users/lea

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


BR.

Léa Massiot


Léa Massiot

I there anything I could do in

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

?

Léa Massiot


ollydbg

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. :)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Léa Massiot

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.next.codeblocks.org/index.php/topic,15852.0.html