Class ADWP
- java.lang.Object
-
- java.lang.Thread
-
- org.eclipse.m2m.atl.debug.core.adwp.ADWP
-
- All Implemented Interfaces:
java.lang.Runnable
- Direct Known Subclasses:
ADWPDebuggee,ADWPDebuggee,ADWPDebugger
public abstract class ADWP extends java.lang.ThreadATL Debug Wire Protocol: declarations for ATL VM debugging protocol. Debugger and debuggee share most protocol code.
-
-
Field Summary
Fields Modifier and Type Field Description static intCMD_CALLCall.static intCMD_CONTINUEContinues.static intCMD_DISASSEMBLEDisassemble.static intCMD_FINISHFinish.static intCMD_GETGet.static intCMD_QUERYQuery.static intCMD_SETSet.static intCMD_SET_BPSet breakpoint.static intCMD_STEPStep.static intCMD_STEP_OVERStep over.static intCMD_UNSET_BPUnset breakpoint.protected java.io.DataInputStreaminstatic intMSG_ANSAnswer.static intMSG_DISAS_CODEDisassemble.static intMSG_STOPPEDStopped.static intMSG_TERMINATEDTerminated.protected java.io.DataOutputStreamoutstatic intTYPE_BOOLEANstatic intTYPE_INTEGERstatic intTYPE_NULLstatic intTYPE_OBJECTObject.static intTYPE_REALstatic intTYPE_STRING
-
Constructor Summary
Constructors Constructor Description ADWP(java.io.InputStream in, java.io.OutputStream out)Creates the protocol using the given streams.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ADWPCommandreadCommand()Reads a command.protected abstract ObjectReferencereadObjectReference(int id)Reads an object reference.protected ValuereadValue()Reads a value from the input stream.voidrun()voidsendMessage(int msg, int ack, java.util.List<Value> args)Sends a message.protected voidwriteValue(Value value)Writes the given value on the output stream.-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Field Detail
-
CMD_CONTINUE
public static final int CMD_CONTINUE
Continues.- See Also:
- Constant Field Values
-
CMD_STEP
public static final int CMD_STEP
Step.- See Also:
- Constant Field Values
-
CMD_STEP_OVER
public static final int CMD_STEP_OVER
Step over.- See Also:
- Constant Field Values
-
CMD_FINISH
public static final int CMD_FINISH
Finish.- See Also:
- Constant Field Values
-
CMD_GET
public static final int CMD_GET
Get.- See Also:
- Constant Field Values
-
CMD_SET
public static final int CMD_SET
Set.- See Also:
- Constant Field Values
-
CMD_CALL
public static final int CMD_CALL
Call.- See Also:
- Constant Field Values
-
CMD_SET_BP
public static final int CMD_SET_BP
Set breakpoint.- See Also:
- Constant Field Values
-
CMD_UNSET_BP
public static final int CMD_UNSET_BP
Unset breakpoint.- See Also:
- Constant Field Values
-
CMD_DISASSEMBLE
public static final int CMD_DISASSEMBLE
Disassemble.- See Also:
- Constant Field Values
-
CMD_QUERY
public static final int CMD_QUERY
Query.- See Also:
- Constant Field Values
-
MSG_STOPPED
public static final int MSG_STOPPED
Stopped.- See Also:
- Constant Field Values
-
MSG_ANS
public static final int MSG_ANS
Answer.- See Also:
- Constant Field Values
-
MSG_DISAS_CODE
public static final int MSG_DISAS_CODE
Disassemble.- See Also:
- Constant Field Values
-
MSG_TERMINATED
public static final int MSG_TERMINATED
Terminated.- See Also:
- Constant Field Values
-
TYPE_BOOLEAN
public static final int TYPE_BOOLEAN
- See Also:
- Constant Field Values
-
TYPE_INTEGER
public static final int TYPE_INTEGER
- See Also:
- Constant Field Values
-
TYPE_STRING
public static final int TYPE_STRING
- See Also:
- Constant Field Values
-
TYPE_OBJECT
public static final int TYPE_OBJECT
Object.- See Also:
- Constant Field Values
-
TYPE_NULL
public static final int TYPE_NULL
- See Also:
- Constant Field Values
-
TYPE_REAL
public static final int TYPE_REAL
- See Also:
- Constant Field Values
-
in
protected java.io.DataInputStream in
-
out
protected java.io.DataOutputStream out
-
-
Method Detail
-
writeValue
protected void writeValue(Value value) throws java.io.IOException
Writes the given value on the output stream.- Parameters:
value- the value to write- Throws:
java.io.IOException
-
readValue
protected Value readValue() throws java.io.IOException
Reads a value from the input stream.- Returns:
- the value.
- Throws:
java.io.IOException
-
readObjectReference
protected abstract ObjectReference readObjectReference(int id)
Reads an object reference.- Parameters:
id- the object id- Returns:
- the
ObjectReference
-
sendMessage
public void sendMessage(int msg, int ack, java.util.List<Value> args)Sends a message.- Parameters:
msg- the messageack- the ackargs- the value arguments
-
readCommand
public ADWPCommand readCommand()
Reads a command.- Returns:
- the command
-
run
public void run()
- Specified by:
runin interfacejava.lang.Runnable- Overrides:
runin classjava.lang.Thread- See Also:
Thread.run()
-
-