Community
Participate
Working Groups
If I set a breakpoint in an external file (not part of a project) that is mounted via NFS on a unix host and add the corresponding directory to the list of source-lookup paths in the launch configuration, the breakpoint manager fails to identify the breakpoint and automatically creates a new one (duplicate) in the breakpoints view upon suspension of the program. The only difference between the two breakpoints is that one refers to the file using an absolute path, while the other refers to the file using a canonical path. For example: absolute path : /a/b/c.h canonical path: /network/a/b/c.h The problem lies in the comparison of line breakpoints inside the method CBreakpointManager$BreakpointMap.isSameBreakpoint(). I suspect that the sourceHandle should be converted to a canonical path before it is used to compare paths, but only if the sourceElement is not an instanceof IFile.
Created attachment 28079 [details] suggested patch for isSameBreakpoint() Also includes a fix for NPE described here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=111828
(In reply to comment #0) > If I set a breakpoint in an external file (not part of a project) that is > mounted via NFS on a unix host and add the corresponding directory to the list > of source-lookup paths in the launch configuration, the breakpoint manager fails > to identify the breakpoint and automatically creates a new one (duplicate) in > the breakpoints view upon suspension of the program. The only difference between > the two breakpoints is that one refers to the file using an absolute path, while > the other refers to the file using a canonical path. For example: > absolute path : /a/b/c.h > canonical path: /network/a/b/c.h > The problem lies in the comparison of line breakpoints inside the method > CBreakpointManager$BreakpointMap.isSameBreakpoint(). I suspect that the > sourceHandle should be converted to a canonical path before it is used to > compare paths, but only if the sourceElement is not an instanceof IFile. Actually, only LocalFileStorage.getFullPath() returns a canonical path. The code has to be changed to check if the source element is an instance of LocalFileStorage.
Applied with modifications to the HEAD and 3.0.1 branches. Can you please try it? Thank you.
(In reply to comment #3) I tested with CDT 3.0.1 and it now works as expected. Thanks
Thanks.
assigning
done