import org.eclipse.debug.core.model.IDebugTarget;
import org.eclipse.debug.core.model.IMemoryBlock;
import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.debug.core.model.IStackFrame;
import org.eclipse.debug.core.model.IThread;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.model.IWorkbenchAdapter;
return PHPDebugCorePlugin.PLUGIN_ID;
}
+ public IStackFrame[] getStackFrames () throws DebugException {
+ return (IStackFrame[]) this.phpDBGProxy.getDBGInterface ().getStackList ();
+ }
+
public IDebugTarget getDebugTarget() {
return this;
}
public synchronized boolean isTerminated() {
return state.isTerminated();
}
+
+ private synchronized void terminateThreads () {
+ int i;
+
+ try {
+ for (i = 0; i < threads.length; i++) {
+ threads[i].terminate ();
+ }
+ } catch (DebugException e) {
+ }
+ }
public synchronized void terminate() {
// This method is synchronized to control a race condition between the
return;
state.setTerminated(true);
phpDBGProxy.stop();
+ terminateThreads ();
this.threads = new PHPThread[0];
fireChangeEvent();
IBreakpointManager manager = DebugPlugin.getDefault()
public void breakpointChanged (IBreakpoint breakpoint, IMarkerDelta arg1) {
PHPLineBreakpoint bp;
bp = (PHPLineBreakpoint) breakpoint;
-
+
try {
- if (breakpoint.isEnabled () && // Check if breakpoint state changed from disabled to enabled
+ if (breakpoint.isEnabled () && // Check if breakpoint state changed from disabled to enabled
!arg1.getAttribute ("org.eclipse.debug.core.enabled", false)) {
this.getPHPDBGProxy().addBreakpoint(breakpoint);
- }
+ }
else if (!breakpoint.isEnabled () && // Check if breakpoint state changed from enabled to disabled
arg1.getAttribute ("org.eclipse.debug.core.enabled", true)) {
this.getPHPDBGProxy().removeBreakpoint(breakpoint);
this.getPHPDBGProxy().addBreakpoint(breakpoint); // and then we add again (else DBG would have two breakpoints!).
}
else {
- this.getPHPDBGProxy().removeBreakpoint(breakpoint);
+ this.getPHPDBGProxy().removeBreakpoint(breakpoint);
}
}
else { // All other cases will terminate the debugger
}
};
}
- return null;
+ else {
+ if (arg0 == PHPDebugElement.class) {
+ return this;
+ }
+
+ return super.getAdapter(arg0);
+ }
}
public IProcess getProcess() {