Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Ryall2008-01-25 19:57:57 -0500
committerKen Ryall2008-01-25 19:57:57 -0500
commitae8f9d3022f07760549f74b83b738739fbfeddbf (patch)
tree1048d1513ad1146bc7ab50434fc33436c13d3a1f
parent7b157e9fb1bffa5461ffe83fe09a50cf38b00da0 (diff)
downloadorg.eclipse.cdt-ae8f9d3022f07760549f74b83b738739fbfeddbf.tar.gz
org.eclipse.cdt-ae8f9d3022f07760549f74b83b738739fbfeddbf.tar.xz
org.eclipse.cdt-ae8f9d3022f07760549f74b83b738739fbfeddbf.zip
Bug 216092
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java10
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/BreakpointProblems.java9
2 files changed, 13 insertions, 6 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java
index 3288793920..47566ecd4b 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java
@@ -529,8 +529,10 @@ public class CBreakpointManager implements IBreakpointsListener, IBreakpointMana
int newLineNumber = movedEvent.getNewLocation().getLineNumber();
int currLineNumber = breakpoint.getMarker().getAttribute(IMarker.LINE_NUMBER, newLineNumber);
breakpoint.getMarker().setAttribute(IMarker.LINE_NUMBER, newLineNumber);
- fBreakpointProblems.add(BreakpointProblems.reportBreakpointMoved(
- breakpoint, currLineNumber, newLineNumber, getDebugTarget().getName(), getDebugTarget().getInternalID()));
+ IMarker marker = BreakpointProblems.reportBreakpointMoved(
+ breakpoint, currLineNumber, newLineNumber, getDebugTarget().getName(), getDebugTarget().getInternalID());
+ if (marker != null)
+ fBreakpointProblems.add(marker);
} catch (CoreException e) {}
}
@@ -704,7 +706,9 @@ public class CBreakpointManager implements IBreakpointsListener, IBreakpointMana
String fileName = breakpoint.getFileName();
ICDIFunctionLocation location = cdiTarget.createFunctionLocation( fileName, function );
ICDICondition condition = createCondition( breakpoint );
- fBreakpointProblems.add(BreakpointProblems.reportUnresolvedBreakpoint(breakpoint, getDebugTarget().getName(), getDebugTarget().getInternalID()));
+ IMarker marker = BreakpointProblems.reportUnresolvedBreakpoint(breakpoint, getDebugTarget().getName(), getDebugTarget().getInternalID());
+ if (marker != null)
+ fBreakpointProblems.add(marker);
if (bpManager2 != null)
b = bpManager2.setFunctionBreakpoint( ICDIBreakpoint.REGULAR, location, condition, true, breakpoints[i].isEnabled() );
else
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/BreakpointProblems.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/BreakpointProblems.java
index 3a502d0fe5..1e44602611 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/BreakpointProblems.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/BreakpointProblems.java
@@ -124,9 +124,12 @@ public class BreakpointProblems {
lineBreakpoint.getMarker().getResource(),
lineBreakpoint.getLineNumber(), description, severity,
"")); //$NON-NLS-1$
- marker.setAttribute(BREAKPOINT_PROBLEM_TYPE, problemType);
- marker.setAttribute(BREAKPOINT_CONTEXT_NAME, contextName);
- marker.setAttribute(BREAKPOINT_CONTEXT_ID, contextID);
+ if (marker != null)
+ {
+ marker.setAttribute(BREAKPOINT_PROBLEM_TYPE, problemType);
+ marker.setAttribute(BREAKPOINT_CONTEXT_NAME, contextName);
+ marker.setAttribute(BREAKPOINT_CONTEXT_ID, contextID);
+ }
}
return marker;
}

Back to the top