Update of /cvsroot/e-p-i-c/org.epic.debug/src/org/epic/debug
In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv14435/src/org/epic/debug
Modified Files:
PerlBreakpoint.java PerlLineBreakpoint.java
Log Message:
Fixed bug [ 1932366 ] Adding/removing breakpoints unreliable when not suspended.
Index: PerlLineBreakpoint.java
===================================================================
RCS file: /cvsroot/e-p-i-c/org.epic.debug/src/org/epic/debug/PerlLineBreakpoint.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- PerlLineBreakpoint.java 27 May 2007 14:30:35 -0000 1.11
+++ PerlLineBreakpoint.java 2 Apr 2008 15:10:57 -0000 1.12
@@ -28,6 +28,8 @@
private static final String CONDITION = "org.epic.debug.condition";
private int hitCount = 0;
+
+ private int removedLineNumber = -1;
private String regExp = "";
@@ -54,7 +56,7 @@
//~ Methods
- public void addLineBreakpointAttributes(Map attributes, String modelIdentifier, boolean enabled,
+ private void addLineBreakpointAttributes(Map attributes, String modelIdentifier, boolean enabled,
int lineNumber, int charStart, int charEnd)
{
attributes.put(IBreakpoint.ID, modelIdentifier);
@@ -67,7 +69,7 @@
attributes.put(IBreakpoint.REGISTERED, Boolean.FALSE);
}
- public void createPerlLineBreakpoint(final IResource resource, final int lineNumber,
+ private void createPerlLineBreakpoint(final IResource resource, final int lineNumber,
final int charStart, final int charEnd, final boolean add, final Map attributes,
final String markerType) throws DebugException
{
@@ -101,7 +103,19 @@
public int getLineNumber() throws CoreException
{
- return ensureMarker().getAttribute(IMarker.LINE_NUMBER, -1);
+ return removedLineNumber != -1
+ ? removedLineNumber
+ : ensureMarker().getAttribute(IMarker.LINE_NUMBER, -1);
+ }
+
+ public void pendingRemove() throws CoreException
+ {
+ super.pendingRemove();
+
+ // Remember the last line number the breakpoint marker had
+ // before it was removed; we need it to remove the breakpoint
+ // from the Perl debugger when it suspends next time:
+ this.removedLineNumber = getLineNumber();
}
/**
Index: PerlBreakpoint.java
===================================================================
RCS file: /cvsroot/e-p-i-c/org.epic.debug/src/org/epic/debug/PerlBreakpoint.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- PerlBreakpoint.java 27 May 2007 14:30:35 -0000 1.12
+++ PerlBreakpoint.java 2 Apr 2008 15:10:57 -0000 1.13
@@ -69,6 +69,10 @@
{
return getMarker().getAttribute(INVALID_POS, false);
}
+
+ public void pendingRemove() throws CoreException
+ {
+ }
public void setInvalidBreakpointPosition(boolean value)
throws CoreException
|