This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
The gdb/mi quoting mechanism is messed up (see http://www.cygwin.com/ml/gdb/2006-02/msg00283.html for details). A side affect of this is that if we try and set a line breakpoint with an absolute path with embedded spaces, the command fails. So we check for embedded spaces and send a path relative to the project basedir or source directory in this case. The problem is that this isn't always unique and can cause a breakpoint in one project to stop another project. If I have 2 projects ("/tmp/Spaced Out/Args_1" and "/tmp/Spaced_out/Args_2") and set a line breakpoint in Args_1 at the 1st printf, the bp command will set the bp at "src/args.c:9". If I then debug Args_2, I'll stop at line 9 because src/args.c:9 is ambiguous. I tried *many* different escapes by hand to see if I could figure out a correct syntax and never got one to work. Its possible it can be done, but not clear what that syntax would be. This issue is a corner case of IZ #149603 (Debugger confuses source files with the same name). I'm closing that as fixed and opening this.
Right after filing this I thought of a probable solution. While I can't set a bp with an absolute path in gdb/mi2, I can check the response (which contains the full path of the file the bp was applied to) against the full original path. If they're not the same, I got a bp in a different file. In that case, I can -break-delete and mark the bp as BP_VALIDATION_FAILED.
Fixed while my idea was fresh in my mind:-) Changeset: http://hg.netbeans.org/main?cmd=changeset;node=1bb3be2653b4
Integrated into 'main-golden', will be available in build *200810310201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/1bb3be2653b4 User: Gordon Prieur <gordonp@netbeans.org> Log: Fixed IZ #151761 gdb confused on line breakpoints for files with embedded spaces
> This issue is a corner case of IZ #149603 (Debugger confuses source files with the same > name). To fix this issue in a NB65 patch you need to apply http://hg.netbeans.org/main?cmd=changeset;node=79fff0b61390 (from 149603) before http://hg.netbeans.org/main?cmd=changeset;node=1bb3be2653b4.
verified in build 200811200201
The fix was ported into release65_fixes. http://hg.netbeans.org/release65_fixes/rev/d328bd98bc78 http://hg.netbeans.org/release65_fixes/rev/af2eaca4de42
The issue has been rolled back from the 65patch1 and moved to 65patch2 based on the QE request. http://hg.netbeans.org/release65_fixes/rev/aa1470a1e160 http://hg.netbeans.org/release65_fixes/rev/c75f57897321
Hello, it impossible to apply mentioned changeset(s) to release65_fixes [ref1] branch because a lot of non-this IZ related changes were made and other changesets pushed into main [ref2] repository between release65_fixes branching time and mentioned changeset(s) pushing time. Please provide cumulative changeset/ set of changesets applicable to release65_fixes branch otherwise this fix will be skipped for current NB65 patch. This problem is common for following IZs: 151761, 151610, 151577, 133134, 155487 [ref1]: http://hg.netbeans.org/release65_fixes [ref2]: http://hg.netbeans.org/main
It would be nice to have the fix in NB 6.5 patch
verified in NB6.5 with provided jar files
Cumulative backport of fixes of IZ 151481(rebackport), 151577, 151610, 153473, 151640, 151761, 155487, 151631, 133134 provided by developer. Backported into release65_fixes branch http://hg.netbeans.org/release65_fixes/rev/84a0c7175a4b
verified in patch2
I got a related issue in NB 651 (Build 200903060201) on Win XP: When I try to debug into a shared library of the C++ sample project "Subproject Application", e.g. hello3.cc, NB immediately removes the added breakpoint, as the path is written with different separators: 125-break-insert -f C:/temp/test/SubProjects/hello3lib/hello3.cc:46 125^done,bkpt={number="7",type="breakpoint",disp="keep",enabled="y",addr="0x6ab011ce",func="hello3 ()",file="hello3.cc",fullname="c:\\temp\\test\\SubProjects\\hello3lib/hello3.cc",line="46",times="0"} 126-break-delete 7 126^done So it is very necessary to compare a unified form of the path.
what you describe was fixed in the issue 159525
Yes, it is fixed in NB67 beta (Build 200904242137)