| Summary: | NPE when setting breakpoint in file where source is unavailable | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Oyvind Harboe <oyvind.harboe> |
| Component: | cdt-debug | Assignee: | Nobody - feel free to take it <nobody> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 3.0 | ||
| Target Milestone: | 3.0.1 | ||
| Hardware: | PC | ||
| OS: | Windows 2000 | ||
| Whiteboard: | |||
Just a comment... you should attach your patch properly to the Bugzilla entry as a patch attachment. This makes the due dilligence on tracking down contributors easier. Doug has asked everyone to do this. (In reply to comment #1) > Just a comment... you should attach your patch properly to the Bugzilla entry > as a patch attachment. I do for all patches. > This makes the due dilligence on tracking down > contributors easier. Doug has asked everyone to do this. I should have added a comment. I didn't submit a patch, just an awkard form of a source file and line number reference :-) The only thing I added was a comment on where the culprit was at: // FIX!!!! getSourceElement() can return "null".... This is known issue (probably it's a duplicate of https://bugs.eclipse.org/bugs/show_bug.cgi?id=111828). I've already had a fix on machine, but I haven't had a time to submit changes. |
Index: CBreakpointManager.java =================================================================== RCS file: /home/tools/org.eclipse.cdt-debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java,v retrieving revision 1.55 diff -u -r1.55 CBreakpointManager.java --- CBreakpointManager.java 6 Sep 2005 20:19:04 -0000 1.55 +++ CBreakpointManager.java 14 Oct 2005 18:49:33 -0000 @@ -189,6 +189,7 @@ String sourceHandle = file; if ( !isEmpty( file ) ) { Object sourceElement = getSourceElement( file ); + // FIX!!!! getSourceElement() can return "null".... sourceHandle = ( sourceElement instanceof IFile ) ? ((IFile)sourceElement).getLocation().toOSString() : ((IStorage)sourceElement).getFullPath().toOSString(); return sourceHandle.equals( ((ICLineBreakpoint)breakpoint).getSourceHandle() ) && location.getLineNumber() == ((ICLineBreakpoint)breakpoint).getLineNumber(); }