Bug 302534 - CBreakpointManager.isSameBreakpoint() doesn't compare breakpoint paths correctly?
Summary: CBreakpointManager.isSameBreakpoint() doesn't compare breakpoint paths correc...
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 0 DD 1.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-debug-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-10 22:02 EST by rayli1107 CLA
Modified: 2020-09-04 15:18 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rayli1107 CLA 2010-02-10 22:02:30 EST
Build Identifier: 20090920-1017

CBreakpointManager.isSameBreakpoint() compares the file paths of two breakpoints as if they're two strings.

I've seen a case, while running Eclipse in Windows environment, where two breakpoints are the same but somehow their file path got represented differently ("C:\\path" vs "C:/path"), so it incorrectly decided that they are two different breakpoints.

Reproducible: Always
Comment 1 John Cortell CLA 2010-02-10 23:52:18 EST
I'm thinking we should, in CBreakpointManager.isSameBreakpoint(), create a File object from getLocation().toOSString() and then calls that File object's getCanonicalPath(), since the path it's compared to is obtained from Path.getCanonicalPath().

Do you have a reproducible case we can test a solution on?
Comment 2 rayli1107 CLA 2010-02-11 14:39:05 EST
Unfortunately, I'm using a custom debugger with a custom Launch mechanism, so I'm not sure how you can reproduce it.
Comment 3 John Cortell CLA 2010-02-25 15:14:03 EST
If you can provide details on the code flow in isSameBreakpoint() in your scenario, I may be able to figure out how the situation happens and work on a solution.