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.Thread
ATL 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 int
CMD_CALL
Call.static int
CMD_CONTINUE
Continues.static int
CMD_DISASSEMBLE
Disassemble.static int
CMD_FINISH
Finish.static int
CMD_GET
Get.static int
CMD_QUERY
Query.static int
CMD_SET
Set.static int
CMD_SET_BP
Set breakpoint.static int
CMD_STEP
Step.static int
CMD_STEP_OVER
Step over.static int
CMD_UNSET_BP
Unset breakpoint.protected java.io.DataInputStream
in
static int
MSG_ANS
Answer.static int
MSG_DISAS_CODE
Disassemble.static int
MSG_STOPPED
Stopped.static int
MSG_TERMINATED
Terminated.protected java.io.DataOutputStream
out
static int
TYPE_BOOLEAN
static int
TYPE_INTEGER
static int
TYPE_NULL
static int
TYPE_OBJECT
Object.static int
TYPE_REAL
static int
TYPE_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 ADWPCommand
readCommand()
Reads a command.protected abstract ObjectReference
readObjectReference(int id)
Reads an object reference.protected Value
readValue()
Reads a value from the input stream.void
run()
void
sendMessage(int msg, int ack, java.util.List<Value> args)
Sends a message.protected void
writeValue(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:
run
in interfacejava.lang.Runnable
- Overrides:
run
in classjava.lang.Thread
- See Also:
Thread.run()
-
-