Created attachment 110425 [details]
unfortunately I have a problem debugging a c program.
When I press Build or Run my program finished with no problem, but when i put breakpoints and want to debug step by step this is what happens:
The debugger starts but all the options (Step In, Step Over...) are all grayed out like in the attachment and after 2-3 seconds debugger exits.
I have read other issues "GDB debugger doesn't stop at breakpoints", tried them but nothing, so could you please help me.
I am using Cygwin on Windows 7 x64 for compilers and debugger.
I just tried the nightly build and nothing.
Hi, please attach the full debugger log (from debugger console view) on the screen I can see only the end of it.
Also please check if step into (from project properties) stops in main.
Created attachment 110706 [details]
I attached the log file but didn't manage to capture the 2-3 last lines. They are to fast to capture but they say something "stopped".
By the way, where can I find the log file?
What do you mean by :"Also please check if step into (from project properties) stops in main.". How do I check this?
Thanks, it helps!
Step into is an item in the project context menu allowing to start debug and stop in main function of the project.
I am having the same problem. When I debug a C program I can set breakpoints in the GUI but the debugger doesn't stop at them.
I can write a program with an endless loop and debug it and I can see clearly that the debugger is running (all the extra buttons appear, etc.)
When I go to: File->Project Properties->Debug I see (under GDB init file): C:\Users\bleahy/.gdbinit [I can find no such file].
GDB version is: GNU gdb (GDB) 184.108.40.20610727-cvs (cygwin-special)
Netbeans is: 7.0.1
gcc is: gcc version 4.3.4 20090804 (release) 1 (GCC)
I see what appear to be logfiles but they are not in plain text.
I am running Windows 7 Professional with Service Pack 1 installed on a 64 bit system.
People running the same NetBeans release on Linux and Macs are not having this problem. GDB will run from the command line outside of NetBeans so I am assuming the problem is between NetBeans and GDB and to go out on a limb I even think it might have to do with forward slashes and back slashes and path names???
it looks like the problem in cygwin gdb 7.3.50
something has changed and this gdb version does not understand paths we provide with "incorrect" slashes: -break-insert C:/abc/abc.c
We can fix it in NB.
workaround is to run IDE with the flag:
*** Bug 202442 has been marked as a duplicate of this bug. ***
(In reply to comment #9)
> *** Bug 202442 has been marked as a duplicate of this bug. ***
Thanks for all your help!! The workaround works well :)
the problem is that current cygwin gdb 7.3.50-2 treat break-insert arguments differently:
general syntax for line breakpoint is "break file:line" but on windows path contains : symbol (C:\...) and current implementation gives error in such case:
No source file named c.
This worked well in gdb 6.8
(In reply to comment #8)
> workaround is to run IDE with the flag:
> netbeans.exe -J-Dgdb.breakpoints.shortpaths=true
WOW... thank you very much... this is working!!!
I really appreciate your effort.
Thank you again!
Integrated into 'main-golden'
User: Egor Ushakov <firstname.lastname@example.org>
Log: fixed #201670 (cygwin gdb 7.3.50 debugger doesn't stop at breakpoints)
Note: Fixed in 7.1 and no need for -J-Dgdb.breakpoints.shortpaths=true anymore
*** Bug 204420 has been marked as a duplicate of this bug. ***
I think it is a bug in gdb (http://sourceware.org/bugzilla/show_bug.cgi?id=12843)
Verified in NetBeans 7.1.1 + Cygwin(gdb 7.3.50) and MinGW (gdb 7.4)