dalvik_get_array_elem

// Get local variable or function argument value
//       name - variable name ("v0", "v1", ... or user defined name)
auto dalvik_get_local(string name);

// Get typed local variable value
//       name - variable name ("v0", "v1", ... or user defined name)
//       wanted_type - Java VM's representation of type signature
auto dalvik_get_local_typed(string name, string wanted_type);

// Get object instance field value
//       oid - object id
//       name - object field name
auto dalvik_get_instance_fld(int64 oid, string name);

// Get number or array elements
//       oid - array object id
long dalvik_get_array_size(int64 oid);

// Get array element by index
//       oid - object id
//       idx - element index
auto dalvik_get_array_elem(int64 oid, long idx);

// ----------------------------------------------------------------------------
// Low-level functions providing access to (parts of) the Java(tm) Debug Wire
// Protocol (JDWP). These functions try to follow the interface of
// https://docs.oracle.com/javase/8/docs/platform/jpda/jdwp/jdwp-protocol.html
// as closely as possible. In general they return IDC objects that have
// attributes named according to the documentation. If repeated information is
// returned (ClassesBySignature, AllClasses, AllThreads, ...), the resulting IDC
// object (amongst other possible named attributes) directly contains an array
// that can be accessed by means of the [] operator.
// ----------------------------------------------------------------------------

// https://docs.oracle.com/javase/8/docs/platform/jpda/jdwp/jdwp-protocol.html#JDWP_VirtualMachine_Version
// Returns the JDWP version implemented by the target VM. The version string format is implementation dependent.
auto JDWP_VirtualMachine_Version();

// https://docs.oracle.com/javase/8/docs/platform/jpda/jdwp/jdwp-protocol.html#JDWP_VirtualMachine_ClassesBySignature
// Returns reference types for all the classes loaded by the target VM which
// match the given signature. Multple reference types will be returned if two
// or more class loaders have loaded a class of the same name. The search is
// confined to loaded classes only; no attempt is made to load a class of the
// given signature.
auto JDWP_VirtualMachine_ClassesBySignature(string signature);

// https://docs.oracle.com/javase/8/docs/platform/jpda/jdwp/jdwp-protocol.html#JDWP_VirtualMachine_AllClasses
// Returns reference types for all classes currently loaded by the target VM.
auto JDWP_VirtualMachine_AllClasses();

// https://docs.oracle.com/javase/8/docs/platform/jpda/jdwp/jdwp-protocol.html#JDWP_VirtualMachine_AllThreads
// Returns all threads currently running in the target VM . The returned list
// contains threads created through java.lang.Thread, all native threads
// attached to the target VM through JNI, and system threads created by the
// target VM. Threads that have not yet been started and threads that have
// completed their execution are not included in the returned list.
auto JDWP_VirtualMachine_AllThreads();

// https://docs.oracle.com/javase/8/docs/platform/jpda/jdwp/jdwp-protocol.html#JDWP_VirtualMachine_IDSizes
// Returns the sizes of variably-sized data types in the target VM.The returned
// values indicate the number of bytes used by the identifiers in command and
// reply packets.
auto JDWP_VirtualMachine_IDSizes();

// https://docs.oracle.com/javase/8/docs/platform/jpda/jdwp/jdwp-protocol.html#JDWP_ReferenceType_Signature
// Returns the JNI signature of a reference type. JNI signature formats are
// described in the Java Native Inteface Specification.
//
// For primitive classes the returned signature is the signature of the
// corresponding primitive type; for example, "I" is returned as the signature
// of the class represented by java.lang.Integer.TYPE.
auto JDWP_ReferenceType_Signature(long refType);

// https://docs.oracle.com/javase/8/docs/platform/jpda/jdwp/jdwp-protocol.html#JDWP_ReferenceType_Methods
// Returns information for each method in a reference type. Inherited methods
// are not included. The list of methods will include constructors (identified
// with the name "<init>"), the initialization method (identified with the name
// "<clinit>") if present, and any synthetic methods created by the compiler.
// Methods are returned in the order they occur in the class file.
auto JDWP_ReferenceType_Methods(long refType);

// https://docs.oracle.com/javase/8/docs/platform/jpda/jdwp/jdwp-protocol.html#JDWP_ReferenceType_Fields
// Returns information for each field in a reference type. Inherited fields are
// not included. The field list will include any synthetic fields created by the
// compiler. Fields are returned in the order they occur in the class file.
auto JDWP_ReferenceType_Fields(long refType);

// https://docs.oracle.com/javase/8/docs/platform/jpda/jdwp/jdwp-protocol.html#JDWP_ReferenceType_NestedTypes
// Returns the classes and interfaces directly nested within this type. Types
// further nested within those types are not included.
auto JDWP_ReferenceType_NestedTypes(long refType);

// https://docs.oracle.com/javase/8/docs/platform/jpda/jdwp/jdwp-protocol.html#JDWP_ReferenceType_SourceFile
// Returns the name of source file in which a reference type was declared.
auto JDWP_ReferenceType_SourceFile(long refType);

// https://docs.oracle.com/javase/8/docs/platform/jpda/jdwp/jdwp-protocol.html#JDWP_ReferenceType_Instances
// Returns instances of this reference type. Only instances that are reachable
// for the purposes of garbage collection are returned.
// Since JDWP version 1.6. Requires canGetInstanceInfo capability - see
// CapabilitiesNew.
auto JDWP_ReferenceType_Instances(long refType, int maxInstances);

// https://docs.oracle.com/javase/8/docs/platform/jpda/jdwp/jdwp-protocol.html#JDWP_Method_VariableTable
// Returns variable information for the method. The variable table includes
// arguments and locals declared within the method. For instance methods,
// the "this" reference is included in the table. Also, synthetic variables
// may be present.
auto JDWP_Method_VariableTable(long refType, long methodId);

// https://docs.oracle.com/javase/8/docs/platform/jpda/jdwp/jdwp-protocol.html#JDWP_Method_Bytecodes
// Retrieve the method's bytecodes as defined in The Java Virtual Machine
// Specification. Requires canGetBytecodes capability - see CapabilitiesNew.
auto JDWP_Method_Bytecodes(long refType, long methodId);

// https://docs.oracle.com/javase/8/docs/platform/jpda/jdwp/jdwp-protocol.html#JDWP_Method_VariableTableWithGeneric
// Returns variable information for the method, including generic signatures
// for the variables. The variable table includes arguments and locals
// declared within the method. For instance methods, the "this" reference is
// included in the table. Also, synthetic variables may be present. Generic
// signatures are described in the signature attribute section in The Java
// Virtual Machine Specification. Since JDWP version 1.5.
auto JDWP_Method_VariableTableWithGeneric(long refType, long methodId);

// https://docs.oracle.com/javase/8/docs/platform/jpda/jdwp/jdwp-protocol.html#JDWP_ObjectReference_ReferenceType
// Returns the runtime type of the object. The runtime type will be a class or
// an array.
auto JDWP_ObjectReference_ReferenceType(long object);

// https://docs.oracle.com/javase/8/docs/platform/jpda/jdwp/jdwp-protocol.html#JDWP_StringReference_Value
// Returns the characters contained in the string.
auto JDWP_StringReference_Value(long stringObject);

// https://docs.oracle.com/javase/8/docs/platform/jpda/jdwp/jdwp-protocol.html#JDWP_ThreadReference_Frames
// Returns the current call stack of a suspended thread. The sequence of frames
// starts with the currently executing frame, followed by its caller, and so
// on. The thread must be suspended, and the returned frameID is valid only
// while the thread is suspended.
auto JDWP_ThreadReference_Frames(long thread, int startFrame, int length);

// https://docs.oracle.com/javase/8/docs/platform/jpda/jdwp/jdwp-protocol.html#JDWP_ThreadReference_ThreadGroup
// Returns the thread group that contains a given thread.
auto JDWP_ThreadReference_ThreadGroup(long thread);

// https://docs.oracle.com/javase/8/docs/platform/jpda/jdwp/jdwp-protocol.html#JDWP_ArrayReference_Length
// Returns the number of components in a given array.
auto JDWP_ArrayReference_Length(long arrayObject);

// https://docs.oracle.com/javase/8/docs/platform/jpda/jdwp/jdwp-protocol.html#JDWP_ArrayReference_GetValues
// Returns a range of array components. The specified range must be within the
// bounds of the array.
auto JDWP_ArrayReference_GetValues(long arrayObject, int firstIndex, int length);

// https://docs.oracle.com/javase/8/docs/platform/jpda/jdwp/jdwp-protocol.html#JDWP_StackFrame_GetValues
// Returns the value of one local variable in a given frame. The variable must
// be visible at the frame's code index. Even if local variable information is
// not available, values can be retrieved if the front-end is able to determine
// the correct local variable index. (Typically, this index can be determined
// for method arguments from the method signature without access to the local
// variable table information.)
//
// MODIFIED to only query one local variable at a time.
auto JDWP_StackFrame_GetValue(long thread, long frame, int slot, byte sigbyte);

Last updated

Was this helpful?