Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327716 - [disassembly] NPE in BreakpointsAnnotationModel
Summary: [disassembly] NPE in BreakpointsAnnotationModel
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf (show other bugs)
Version: 7.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 7.0.2   Edit
Assignee: Anton Leherbauer CLA
QA Contact: Pawel Piech CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-13 18:19 EDT by Siva Velusamy CLA
Modified: 2010-10-14 06:23 EDT (History)
1 user (show)

See Also:


Attachments
patch that shows the additional check necessary (1011 bytes, patch)
2010-10-13 18:23 EDT, Siva Velusamy CLA
aleherb+eclipse: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.