[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] DSF disassembly view NPE
|
Siva,
Thanks for reporting the problem. The proper channel for this sort of
thing is bugzilla. Can you open a bug and attach the patch to make
sure this doesn't fall through the cracks?
John
At 05:31 PM 10/12/2010, Siva Velusamy wrote:
Hi,
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 copied the diff below:
---
orig/plugins/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/model/BreakpointsAnnotationModel.java
2010-10-12 10:48:57.667296000 -0700
+++
new/plugins/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/model/BreakpointsAnnotationModel.java
2010-10-12 14:22:33.089508000 -0700
@@ -200,7 +200,9 @@
position=
createPositionFromSourceLine((IFile) marker.getResource(),
lineNumber);
} else if (breakpoint instanceof
ICLineBreakpoint) {
ICLineBreakpoint cBreakpoint=
(ICLineBreakpoint) breakpoint;
- position=
createPositionFromSourceLine(cBreakpoint.getFileName(), lineNumber);
+ String fName =
cBreakpoint.getFileName();
+ if (fName != null)
+ position=
createPositionFromSourceLine(fName, lineNumber);
if (position == null) {
position=
createPositionFromAddress(decodeAddress(cBreakpoint.getAddress()));
}
cBreakpoint.getFileName() returns null if it cannot find the file
name, and createPositionFromSourceLine barfs if null is passed as
first argument.
/Siva
--
In the end, everything is a gag.
Charlie Chaplin
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev