Microsoft SDK for Java

Retrieving Dynamic Information

Dynamic information on a Java process is available through the IRemoteObject hierarchy of interfaces. These interfaces provide bound access to objects of different types. An object does not necessarily refer to an instance of a class, but represents an instance of any data type. The information obtained from an IRemoteObject is only valid during the lifetime of the actual object that it represents. Consequently, dynamic information cannot be cached by the debugger across execution of the process being debugged.

See the Dynamic Information Debugger Interfaces reference for details.

Java uses a number of built-in types that can be represented as C or C++ typedefs as follows:

// JAVA built-in types.
typedef unsigned char   JAVA_BOOLEAN;
typedef signed char     JAVA_BYTE;
typedef unsigned short  JAVA_CHAR;
typedef double          JAVA_DOUBLE;
typedef float           JAVA_FLOAT;
typedef signed long     JAVA_INT;
typedef hyper           JAVA_LONG;
typedef short int       JAVA_SHORT;
typedef wchar_t         JAVA_STRING;

The IRemoteObject interface implements a set of methods used to get the type of an object, and set or clear data breakpoints on the object. A data breakpoint will fire when the value of the associated object changes. For classes, a data breakpoint will fire when the object references a different instance of that class. For arrays, a data breakpoint will fire when the object references a different instance of the array. GetFieldObject provides a way for a debugger to access fields in a container.

A Java array object is represented by an IRemoteArrayObject interface. The debugger can call GetSize to determine the number of elements in an array. Enumerators for the elements of an array can be obtained by calling GetElementObjects for an array of objects or GetElementValues for an array of primitive data types.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.