Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 327716

Summary: [disassembly] NPE in BreakpointsAnnotationModel
Product: [Tools] CDT Reporter: Siva Velusamy <siva.velusamy>
Component: cdt-debug-dsfAssignee: Anton Leherbauer <aleherb+eclipse>
Status: RESOLVED FIXED QA Contact: Pawel Piech <pawel.1.piech>
Severity: normal    
Priority: P3 CC: cdtdoug
Version: 7.0   
Target Milestone: 7.0.2   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
patch that shows the additional check necessary aleherb+eclipse: iplog-

Description Siva Velusamy CLA 2010-10-13 18:19:10 EDT
Build Identifier: CDT 7.0.0

While upgrading our IDE from Galileo to Helios, I noticed a NPE crop
up on starting the disassembly view. A trivial change fixed the issue
- I've attached the diff.

In file plugins/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/model/BreakpointsAnnotationModel.java, cBreakpoint.getFileName() returns null if it cannot find the file name, and createPositionFromSourceLine barfs if null is passed as first argument.


Reproducible: Always

Steps to Reproduce:
1. Open DSF disassembly view
2. Program should be stopped at a breakpoint where CDT cannot find the file name from the breakpoint.
3.
Comment 1 Siva Velusamy CLA 2010-10-13 18:23:11 EDT
Created attachment 180835 [details]
patch that shows the additional check necessary
Comment 2 Anton Leherbauer CLA 2010-10-14 05:38:18 EDT
Thanks, I fixed this and another potential NPE a little different.