[Pydev-cvs] org.python.pydev.debug/src/org/python/pydev/debug/model PyThread.java,1.9,1.10 PyDebugTa
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2005-08-11 18:18:42
|
Update of /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31775/src/org/python/pydev/debug/model Modified Files: PyThread.java PyDebugTarget.java Log Message: debugger changes so that we stop and exit nicely Index: PyThread.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/model/PyThread.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** PyThread.java 28 Jul 2005 23:08:05 -0000 1.9 --- PyThread.java 11 Aug 2005 18:18:33 -0000 1.10 *************** *** 170,176 **** public IStackFrame[] getStackFrames() throws DebugException { ! while (stack == null) // Busy wait, the other thread will supply the stack shortly ! ; ! return stack; } --- 170,177 ---- public IStackFrame[] getStackFrames() throws DebugException { ! if(isSuspended && stack != null){ ! return stack; ! } ! return new IStackFrame[0]; } Index: PyDebugTarget.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/model/PyDebugTarget.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** PyDebugTarget.java 15 Jul 2005 16:02:14 -0000 1.13 --- PyDebugTarget.java 11 Aug 2005 18:18:33 -0000 1.14 *************** *** 169,176 **** --- 169,182 ---- public boolean canTerminate() { // We can always terminate, it does no harm + if(process == null){ + return false; + } return true; } public boolean isTerminated() { + if(process == null){ + return true; + } return process.isTerminated(); } *************** *** 181,184 **** --- 187,191 ---- threads = new IThread[0]; process.terminate(); + process = null; fireEvent(new DebugEvent(this, DebugEvent.TERMINATE)); } |