38 |
|
|
39 |
package gnu.classpath.jdwp.processor; |
package gnu.classpath.jdwp.processor; |
40 |
|
|
|
import gnu.classpath.jdwp.IVirtualMachine; |
|
|
import gnu.classpath.jdwp.Jdwp; |
|
41 |
import gnu.classpath.jdwp.JdwpConstants; |
import gnu.classpath.jdwp.JdwpConstants; |
42 |
import gnu.classpath.jdwp.exception.JdwpException; |
import gnu.classpath.jdwp.exception.JdwpException; |
43 |
import gnu.classpath.jdwp.exception.JdwpInternalErrorException; |
import gnu.classpath.jdwp.exception.JdwpInternalErrorException; |
44 |
import gnu.classpath.jdwp.exception.NotImplementedException; |
import gnu.classpath.jdwp.exception.NotImplementedException; |
|
import gnu.classpath.jdwp.id.IdManager; |
|
45 |
import gnu.classpath.jdwp.id.ObjectId; |
import gnu.classpath.jdwp.id.ObjectId; |
46 |
import gnu.classpath.jdwp.id.ReferenceTypeId; |
import gnu.classpath.jdwp.id.ReferenceTypeId; |
47 |
import gnu.classpath.jdwp.util.LineTable; |
import gnu.classpath.jdwp.util.LineTable; |
57 |
* |
* |
58 |
* @author Aaron Luchko <aluchko@redhat.com> |
* @author Aaron Luchko <aluchko@redhat.com> |
59 |
*/ |
*/ |
60 |
public class MethodCommandSet implements CommandSet |
public class MethodCommandSet |
61 |
|
extends CommandSet |
62 |
{ |
{ |
|
// Our hook into the jvm |
|
|
private final IVirtualMachine vm = Jdwp.getIVirtualMachine(); |
|
|
|
|
|
// Manages all the different ids that are assigned by jdwp |
|
|
private final IdManager idMan = Jdwp.getIdManager(); |
|
|
|
|
63 |
public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command) |
public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command) |
64 |
throws JdwpException |
throws JdwpException |
65 |
{ |
{ |
102 |
ReferenceTypeId refId = idMan.readReferenceTypeId(bb); |
ReferenceTypeId refId = idMan.readReferenceTypeId(bb); |
103 |
Class clazz = refId.getType(); |
Class clazz = refId.getType(); |
104 |
|
|
105 |
ObjectId oid = idMan.readId(bb); |
ObjectId oid = idMan.readObjectId(bb); |
106 |
Method method = (Method) oid.getObject(); |
Method method = (Method) oid.getObject(); |
107 |
|
|
108 |
LineTable lt = vm.getLineTable(clazz, method); |
LineTable lt = vm.getLineTable(clazz, method); |
115 |
ReferenceTypeId refId = idMan.readReferenceTypeId(bb); |
ReferenceTypeId refId = idMan.readReferenceTypeId(bb); |
116 |
Class clazz = refId.getType(); |
Class clazz = refId.getType(); |
117 |
|
|
118 |
ObjectId oid = idMan.readId(bb); |
ObjectId oid = idMan.readObjectId(bb); |
119 |
Method method = (Method) oid.getObject(); |
Method method = (Method) oid.getObject(); |
120 |
|
|
121 |
VariableTable vt = vm.getVarTable(clazz, method); |
VariableTable vt = vm.getVarTable(clazz, method); |