Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 201670 - cygwin gdb 7.3.50 debugger doesn't stop at breakpoints
cygwin gdb 7.3.50 debugger doesn't stop at breakpoints
Product: cnd
Classification: Unclassified
Component: Debugger
PC Windows 7 x64
: P3 with 1 vote (vote)
: 7.1
Assigned To: Egor Ushakov
: 202442 204420 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2011-09-06 11:04 UTC by Dzontra
Modified: 2012-02-27 09:27 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT

debugger information (285.10 KB, image/jpeg)
2011-09-06 11:04 UTC, Dzontra
log file (6.65 KB, text/plain)
2011-09-13 11:59 UTC, Dzontra

Note You need to log in before you can comment on or make changes to this bug.
Description Dzontra 2011-09-06 11:04:42 UTC
Created attachment 110425 [details]
debugger information


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.

Thank you!
Sincerely yours,
Comment 1 Egor Ushakov 2011-09-08 14:58:48 UTC
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.
Comment 2 Dzontra 2011-09-13 11:59:15 UTC
Created attachment 110706 [details]
log file
Comment 3 Dzontra 2011-09-13 12:06:02 UTC
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?
Comment 4 Egor Ushakov 2011-09-13 12:28:00 UTC
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.
Comment 5 bleahy48 2011-09-13 12:59:47 UTC
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) (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???
Comment 6 Egor Ushakov 2011-09-29 12:36:53 UTC
it looks like the problem in cygwin gdb 7.3.50
Comment 7 Egor Ushakov 2011-09-29 12:38:04 UTC
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.
Comment 8 Egor Ushakov 2011-09-29 12:47:57 UTC
workaround is to run IDE with the flag:
netbeans.exe -J-Dgdb.breakpoints.shortpaths=true
Comment 9 Egor Ushakov 2011-09-29 13:09:24 UTC
*** Bug 202442 has been marked as a duplicate of this bug. ***
Comment 10 lurqu01 2011-09-29 21:16:59 UTC
(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 :)
Comment 11 Egor Ushakov 2011-09-30 14:48:34 UTC
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:
break c:\abc:3
No source file named c.
This worked well in gdb 6.8
Comment 12 Egor Ushakov 2011-10-03 10:00:16 UTC
fixed in:
Comment 13 Dzontra 2011-10-04 07:44:14 UTC
(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!
Comment 14 Quality Engineering 2011-10-04 14:08:41 UTC
Integrated into 'main-golden'
User: Egor Ushakov <>
Log: fixed #201670 (cygwin gdb 7.3.50 debugger doesn't stop at breakpoints)
Comment 15 Vladimir Voskresensky 2011-10-14 09:30:02 UTC
Note: Fixed in 7.1 and no need for -J-Dgdb.breakpoints.shortpaths=true anymore
Comment 16 Egor Ushakov 2011-10-31 09:11:24 UTC
*** Bug 204420 has been marked as a duplicate of this bug. ***
Comment 17 Egor Ushakov 2011-11-01 10:08:25 UTC
*** Bug 204420 has been marked as a duplicate of this bug. ***
Comment 18 soldatov 2011-11-24 10:50:40 UTC
I think it is a bug in gdb (
Comment 19 soldatov 2012-02-27 09:27:39 UTC
Verified in NetBeans 7.1.1 + Cygwin(gdb 7.3.50) and MinGW (gdb 7.4)

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo