| Summary: | duplicate breakpoints when using MingW | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Siva Velusamy <siva.velusamy> | ||||
| Component: | cdt-debug | Assignee: | cdt-debug-inbox <cdt-debug-inbox> | ||||
| Status: | NEW --- | QA Contact: | Jonah Graham <jonah> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | cdtdoug, pawel.1.piech, salvatore.culcasi, siva.velusamy | ||||
| Version: | 7.0 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 185350 [details]
The attached patch normalizes both paths before comparing them
|
Build Identifier: CDT 7.0.0 On Windows XPS, I notice that whenever a breakpoint is set in the editor, the breakpoints view shows two of them. One of the them is installed as part of the user action, and the 2nd one is installed when the MI response of breakpoint inserted is received. It looks like the problem is because of two styles of paths used: C:/path/to/file.c C:\\path\\to\\file.c The following patch solves the issue, but I'm not fully sure if it is the right thing to do: diff -u cvs-reorg/plugins/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java src-updated/plugins/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java --- cvs-reorg/plugins/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java 2010-07-15 14:09:25.514221000 -0700 +++ src-updated/plugins/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java 2010-12-15 16:18:00.621082000 -0800 @@ -237,6 +237,8 @@ catch( IOException e ) { } } + sourceHandle = new Path(sourceHandle).toOSString(); + bpSourceHandle = new Path(bpSourceHandle).toOSString(); return sourceHandle.equals( bpSourceHandle ) && location.getLineNumber() == ((ICLineBreakpoint)breakpoint).getLineNumber(); } } Reproducible: Always Steps to Reproduce: 1. Start debugging 2. Set a breakpoint by double clicking the marker in the editor. 3.