[Pydev-cvs] org.python.pydev.debug/src/org/python/pydev/debug/model/remote SetBreakpointCommand.java
Brought to you by:
fabioz
From: Aleksandar T. <at...@us...> - 2004-05-07 02:03:23
|
Update of /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/model/remote In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13484/src/org/python/pydev/debug/model/remote Modified Files: VersionCommand.java ThreadListCommand.java GetVariableCommand.java StepCommand.java RemoteDebugger.java ThreadKillCommand.java ThreadSuspendCommand.java ThreadRunCommand.java AbstractDebuggerCommand.java Added Files: SetBreakpointCommand.java RemoveBreakpointCommand.java Log Message: Breakpoints, first cut Index: RemoteDebugger.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/model/remote/RemoteDebugger.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RemoteDebugger.java 5 May 2004 02:02:01 -0000 1.1 --- RemoteDebugger.java 7 May 2004 02:03:08 -0000 1.2 *************** *** 14,18 **** import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; - import org.eclipse.core.runtime.Status; import org.eclipse.debug.core.model.IProcess; import org.python.pydev.debug.core.PydevDebugPlugin; --- 14,17 ---- *************** *** 261,265 **** if (errorMessage.length() != 0) // not sure if this is really an error ! throw new CoreException(new Status(IStatus.ERROR, PydevDebugPlugin.getPluginID(), 0, "Something got printed in the error stream", null)); } catch (IllegalThreadStateException e) { // expected while process is alive --- 260,264 ---- if (errorMessage.length() != 0) // not sure if this is really an error ! throw new CoreException(PydevDebugPlugin.makeStatus(IStatus.ERROR, "Something got printed in the error stream", null)); } catch (IllegalThreadStateException e) { // expected while process is alive Index: ThreadKillCommand.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/model/remote/ThreadKillCommand.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ThreadKillCommand.java 5 May 2004 02:02:01 -0000 1.1 --- ThreadKillCommand.java 7 May 2004 02:03:08 -0000 1.2 *************** *** 20,24 **** public String getOutgoing() { ! return makeCommand(Integer.toString(CMD_THREAD_KILL), sequence, thread_id); } --- 20,24 ---- public String getOutgoing() { ! return makeCommand(CMD_THREAD_KILL, sequence, thread_id); } Index: ThreadListCommand.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/model/remote/ThreadListCommand.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ThreadListCommand.java 5 May 2004 02:02:01 -0000 1.1 --- ThreadListCommand.java 7 May 2004 02:03:08 -0000 1.2 *************** *** 45,49 **** public String getOutgoing() { ! return makeCommand(Integer.toString(CMD_LIST_THREADS), sequence, ""); } --- 45,49 ---- public String getOutgoing() { ! return makeCommand(CMD_LIST_THREADS, sequence, ""); } Index: ThreadSuspendCommand.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/model/remote/ThreadSuspendCommand.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ThreadSuspendCommand.java 5 May 2004 02:02:01 -0000 1.1 --- ThreadSuspendCommand.java 7 May 2004 02:03:08 -0000 1.2 *************** *** 21,25 **** public String getOutgoing() { ! return makeCommand(Integer.toString(CMD_THREAD_SUSPEND), sequence, thread); } } --- 21,25 ---- public String getOutgoing() { ! return makeCommand(CMD_THREAD_SUSPEND, sequence, thread); } } Index: StepCommand.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/model/remote/StepCommand.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** StepCommand.java 5 May 2004 02:02:01 -0000 1.1 --- StepCommand.java 7 May 2004 02:03:08 -0000 1.2 *************** *** 25,29 **** public String getOutgoing() { ! return makeCommand(Integer.toString(command_id), sequence, thread_id); } --- 25,29 ---- public String getOutgoing() { ! return makeCommand(command_id, sequence, thread_id); } Index: VersionCommand.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/model/remote/VersionCommand.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** VersionCommand.java 5 May 2004 02:02:01 -0000 1.1 --- VersionCommand.java 7 May 2004 02:03:07 -0000 1.2 *************** *** 23,27 **** public String getOutgoing() { ! return makeCommand(Integer.toString(CMD_VERSION), sequence, VERSION); } --- 23,27 ---- public String getOutgoing() { ! return makeCommand(CMD_VERSION, sequence, VERSION); } Index: ThreadRunCommand.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/model/remote/ThreadRunCommand.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ThreadRunCommand.java 5 May 2004 02:02:01 -0000 1.1 --- ThreadRunCommand.java 7 May 2004 02:03:08 -0000 1.2 *************** *** 19,23 **** public String getOutgoing() { ! return makeCommand(Integer.toString(CMD_THREAD_RUN), sequence, thread); } } --- 19,23 ---- public String getOutgoing() { ! return makeCommand(CMD_THREAD_RUN, sequence, thread); } } --- NEW FILE: RemoveBreakpointCommand.java --- /* * Author: atotic * Created on May 6, 2004 * License: Common Public License v1.0 */ package org.python.pydev.debug.model.remote; /** * Remove breakpoint command */ public class RemoveBreakpointCommand extends AbstractDebuggerCommand { public String file; public Object line; public RemoveBreakpointCommand(RemoteDebugger debugger, String file, Object line) { super(debugger); this.file = file; this.line = line; } public String getOutgoing() { return makeCommand(CMD_REMOVE_BREAK, sequence, file + "\t" + line.toString()); } } Index: AbstractDebuggerCommand.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/model/remote/AbstractDebuggerCommand.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AbstractDebuggerCommand.java 5 May 2004 02:02:01 -0000 1.1 --- AbstractDebuggerCommand.java 7 May 2004 02:03:08 -0000 1.2 *************** *** 42,45 **** --- 42,47 ---- static public final int CMD_STEP_RETURN = 109; static public final int CMD_GET_VARIABLE = 110; + static public final int CMD_SET_BREAK = 111; + static public final int CMD_REMOVE_BREAK = 112; static public final int CMD_ERROR = 901; static public final int CMD_VERSION = 501; *************** *** 117,121 **** } ! public static String makeCommand(String code, int sequence, String payload) { StringBuffer s = new StringBuffer(); s.append(code); --- 119,123 ---- } ! public static String makeCommand(int code, int sequence, String payload) { StringBuffer s = new StringBuffer(); s.append(code); --- NEW FILE: SetBreakpointCommand.java --- /* * Author: atotic * Created on May 6, 2004 * License: Common Public License v1.0 */ package org.python.pydev.debug.model.remote; /** * Set breakpoint command. */ public class SetBreakpointCommand extends AbstractDebuggerCommand { public String file; public Object line; public SetBreakpointCommand(RemoteDebugger debugger, String file, Object line) { super(debugger); this.file = file; this.line = line; } public String getOutgoing() { return makeCommand(CMD_SET_BREAK, sequence, file + "\t" + line.toString()); } } Index: GetVariableCommand.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/model/remote/GetVariableCommand.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GetVariableCommand.java 5 May 2004 02:02:01 -0000 1.1 --- GetVariableCommand.java 7 May 2004 02:03:08 -0000 1.2 *************** *** 8,12 **** import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IStatus; - import org.eclipse.core.runtime.Status; import org.python.pydev.debug.core.PydevDebugPlugin; --- 8,11 ---- *************** *** 30,34 **** public String getOutgoing() { ! return makeCommand(Integer.toString(CMD_GET_VARIABLE), sequence, locator); } --- 29,33 ---- public String getOutgoing() { ! return makeCommand(CMD_GET_VARIABLE, sequence, locator); } *************** *** 56,62 **** if (isError) throw new CoreException( ! new Status(IStatus.ERROR, ! PydevDebugPlugin.getPluginID(), ! 0, "pydevd error:" + payload , null)); --- 55,59 ---- if (isError) throw new CoreException( ! PydevDebugPlugin.makeStatus(IStatus.ERROR, "pydevd error:" + payload , null)); |