< prev index next >

src/jdk.jdwp.agent/share/native/libjdwp/util.h

Print this page


   1 /*
   2  * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  60     struct RefNode *next;       /* next RefNode* in bucket chain */
  61     jint         count;         /* count of references */
  62     unsigned     isStrong : 1;  /* 1 means this is a string reference */
  63 } RefNode;
  64 
  65 /* Value of a NULL ID */
  66 #define NULL_OBJECT_ID  ((jlong)0)
  67 
  68 /*
  69  * Globals used throughout the back end
  70  */
  71 
  72 typedef jint FrameNumber;
  73 
  74 typedef struct {
  75     jvmtiEnv *jvmti;
  76     JavaVM   *jvm;
  77     volatile jboolean vmDead; /* Once VM is dead it stays that way - don't put in init */
  78     jboolean assertOn;
  79     jboolean assertFatal;




  80     jboolean doerrorexit;
  81     jboolean modifiedUtf8;
  82     jboolean quiet;
  83 


  84     /* Debug flags (bit mask) */
  85     int      debugflags;
  86 
  87     /* Possible debug flags */
  88     #define USE_ITERATE_THROUGH_HEAP 0X001
  89 
  90     char * options;
  91 
  92     jclass              classClass;

  93     jclass              threadClass;
  94     jclass              threadGroupClass;
  95     jclass              classLoaderClass;
  96     jclass              stringClass;
  97     jclass              systemClass;



  98     jmethodID           threadConstructor;
  99     jmethodID           threadSetDaemon;
 100     jmethodID           threadResume;
 101     jmethodID           systemGetProperty;
 102     jmethodID           setProperty;
 103     jthreadGroup        systemThreadGroup;

 104     jobject             agent_properties;
 105 
 106     jint                cachedJvmtiVersion;
 107     jvmtiCapabilities   cachedJvmtiCapabilities;
 108     jboolean            haveCachedJvmtiCapabilities;
 109     jvmtiEventCallbacks callbacks;
 110 
 111     /* Various property values we should grab on initialization */
 112     char* property_java_version;          /* UTF8 java.version */
 113     char* property_java_vm_name;          /* UTF8 java.vm.name */
 114     char* property_java_vm_info;          /* UTF8 java.vm.info */
 115     char* property_java_class_path;       /* UTF8 java.class.path */
 116     char* property_sun_boot_library_path; /* UTF8 sun.boot.library.path */
 117     char* property_path_separator;        /* UTF8 path.separator */
 118     char* property_user_dir;              /* UTF8 user.dir */
 119 
 120     unsigned log_flags;
 121 
 122     /* Common References static data */
 123     jrawMonitorID refLock;


 143         EI_SINGLE_STEP          =  1,
 144         EI_BREAKPOINT           =  2,
 145         EI_FRAME_POP            =  3,
 146         EI_EXCEPTION            =  4,
 147         EI_THREAD_START         =  5,
 148         EI_THREAD_END           =  6,
 149         EI_CLASS_PREPARE        =  7,
 150         EI_GC_FINISH            =  8,
 151         EI_CLASS_LOAD           =  9,
 152         EI_FIELD_ACCESS         = 10,
 153         EI_FIELD_MODIFICATION   = 11,
 154         EI_EXCEPTION_CATCH      = 12,
 155         EI_METHOD_ENTRY         = 13,
 156         EI_METHOD_EXIT          = 14,
 157         EI_MONITOR_CONTENDED_ENTER = 15,
 158         EI_MONITOR_CONTENDED_ENTERED = 16,
 159         EI_MONITOR_WAIT         = 17,
 160         EI_MONITOR_WAITED       = 18,
 161         EI_VM_INIT              = 19,
 162         EI_VM_DEATH             = 20,
 163         EI_max                  = 20







 164 } EventIndex;
 165 
 166 /* Agent errors that might be in a jvmtiError for JDWP or internal.
 167  *    (Done this way so that compiler allows it's use as a jvmtiError)
 168  */
 169 #define _AGENT_ERROR(x)                 ((jvmtiError)(JVMTI_ERROR_MAX+64+x))
 170 #define AGENT_ERROR_INTERNAL                    _AGENT_ERROR(1)
 171 #define AGENT_ERROR_VM_DEAD                     _AGENT_ERROR(2)
 172 #define AGENT_ERROR_NO_JNI_ENV                  _AGENT_ERROR(3)
 173 #define AGENT_ERROR_JNI_EXCEPTION               _AGENT_ERROR(4)
 174 #define AGENT_ERROR_JVMTI_INTERNAL              _AGENT_ERROR(5)
 175 #define AGENT_ERROR_JDWP_INTERNAL               _AGENT_ERROR(6)
 176 #define AGENT_ERROR_NOT_CURRENT_FRAME           _AGENT_ERROR(7)
 177 #define AGENT_ERROR_OUT_OF_MEMORY               _AGENT_ERROR(8)
 178 #define AGENT_ERROR_INVALID_TAG                 _AGENT_ERROR(9)
 179 #define AGENT_ERROR_ALREADY_INVOKING            _AGENT_ERROR(10)
 180 #define AGENT_ERROR_INVALID_INDEX               _AGENT_ERROR(11)
 181 #define AGENT_ERROR_INVALID_LENGTH              _AGENT_ERROR(12)
 182 #define AGENT_ERROR_INVALID_STRING              _AGENT_ERROR(13)
 183 #define AGENT_ERROR_INVALID_CLASS_LOADER        _AGENT_ERROR(14)
 184 #define AGENT_ERROR_INVALID_ARRAY               _AGENT_ERROR(15)
 185 #define AGENT_ERROR_TRANSPORT_LOAD              _AGENT_ERROR(16)
 186 #define AGENT_ERROR_TRANSPORT_INIT              _AGENT_ERROR(17)
 187 #define AGENT_ERROR_NATIVE_METHOD               _AGENT_ERROR(18)
 188 #define AGENT_ERROR_INVALID_COUNT               _AGENT_ERROR(19)
 189 #define AGENT_ERROR_INVALID_FRAMEID             _AGENT_ERROR(20)
 190 #define AGENT_ERROR_NULL_POINTER                _AGENT_ERROR(21)
 191 #define AGENT_ERROR_ILLEGAL_ARGUMENT            _AGENT_ERROR(22)
 192 #define AGENT_ERROR_INVALID_THREAD              _AGENT_ERROR(23)
 193 #define AGENT_ERROR_INVALID_EVENT_TYPE          _AGENT_ERROR(24)
 194 #define AGENT_ERROR_INVALID_OBJECT              _AGENT_ERROR(25)
 195 #define AGENT_ERROR_NO_MORE_FRAMES              _AGENT_ERROR(26)
 196 #define AGENT_ERROR_INVALID_MODULE              _AGENT_ERROR(27)
 197 
 198 /* Combined event information */
 199 
 200 typedef struct {
 201 
 202     EventIndex  ei;
 203     jthread     thread;




 204     jclass      clazz;
 205     jmethodID   method;
 206     jlocation   location;
 207     jobject     object; /* possibly an exception or user object */
 208 
 209     union {
 210 
 211         /* ei = EI_FIELD_ACCESS */
 212         struct {
 213             jclass      field_clazz;
 214             jfieldID    field;
 215         } field_access;
 216 
 217         /* ei = EI_FIELD_MODIFICATION */
 218         struct {
 219             jclass      field_clazz;
 220             jfieldID    field;
 221             char        signature_type;
 222             jvalue      new_value;
 223         } field_modification;


 308 void sharedGetFieldValues(struct PacketInputStream *in,
 309                           struct PacketOutputStream *out,
 310                           jboolean isStatic);
 311 jboolean sharedInvoke(struct PacketInputStream *in,
 312                       struct PacketOutputStream *out);
 313 
 314 jvmtiError fieldSignature(jclass, jfieldID, char **, char **, char **);
 315 jvmtiError fieldModifiers(jclass, jfieldID, jint *);
 316 jvmtiError methodSignature(jmethodID, char **, char **, char **);
 317 jvmtiError methodReturnType(jmethodID, char *);
 318 jvmtiError methodModifiers(jmethodID, jint *);
 319 jvmtiError methodClass(jmethodID, jclass *);
 320 jvmtiError methodLocation(jmethodID, jlocation*, jlocation*);
 321 jvmtiError classLoader(jclass, jobject *);
 322 
 323 /*
 324  * Thin wrappers on top of JNI
 325  */
 326 JNIEnv *getEnv(void);
 327 jboolean isClass(jobject object);

 328 jboolean isThread(jobject object);
 329 jboolean isThreadGroup(jobject object);
 330 jboolean isString(jobject object);
 331 jboolean isClassLoader(jobject object);
 332 jboolean isArray(jobject object);
 333 
 334 /*
 335  * Thin wrappers on top of JVMTI
 336  */
 337 jvmtiError jvmtiGetCapabilities(jvmtiCapabilities *caps);
 338 jint jvmtiMajorVersion(void);
 339 jint jvmtiMinorVersion(void);
 340 jint jvmtiMicroVersion(void);
 341 jvmtiError getSourceDebugExtension(jclass clazz, char **extensionPtr);
 342 jboolean canSuspendResumeThreadLists(void);
 343 
 344 jrawMonitorID debugMonitorCreate(char *name);
 345 void debugMonitorEnter(jrawMonitorID theLock);
 346 void debugMonitorExit(jrawMonitorID theLock);
 347 void debugMonitorWait(jrawMonitorID theLock);


 351 void debugMonitorDestroy(jrawMonitorID theLock);
 352 
 353 jthread *allThreads(jint *count);
 354 
 355 void threadGroupInfo(jthreadGroup, jvmtiThreadGroupInfo *info);
 356 
 357 jclass findClass(JNIEnv *env, const char * name);
 358 jmethodID getMethod(JNIEnv *env, jclass clazz, const char * name, const char *signature);
 359 char *getModuleName(jclass);
 360 char *getClassname(jclass);
 361 jvmtiError classSignature(jclass, char**, char**);
 362 jint classStatus(jclass);
 363 void writeGenericSignature(struct PacketOutputStream *, char *);
 364 jboolean isMethodNative(jmethodID);
 365 jboolean isMethodObsolete(jmethodID);
 366 jvmtiError isMethodSynthetic(jmethodID, jboolean*);
 367 jvmtiError isFieldSynthetic(jclass, jfieldID, jboolean*);
 368 
 369 jboolean isSameObject(JNIEnv *env, jobject o1, jobject o2);
 370 





 371 jint objectHashCode(jobject);
 372 
 373 jvmtiError allInterfaces(jclass clazz, jclass **ppinterfaces, jint *count);
 374 jvmtiError allLoadedClasses(jclass **ppclasses, jint *count);
 375 jvmtiError allClassLoaderClasses(jobject loader, jclass **ppclasses, jint *count);
 376 jvmtiError allNestedClasses(jclass clazz, jclass **ppnested, jint *pcount);
 377 
 378 void setAgentPropertyValue(JNIEnv *env, char *propertyName, char* propertyValue);
 379 
 380 void *jvmtiAllocate(jint numBytes);
 381 void jvmtiDeallocate(void *buffer);
 382 
 383 void             eventIndexInit(void);

 384 jdwpEvent        eventIndex2jdwp(EventIndex i);
 385 jvmtiEvent       eventIndex2jvmti(EventIndex i);
 386 EventIndex       jdwp2EventIndex(jdwpEvent eventType);
 387 EventIndex       jvmti2EventIndex(jvmtiEvent kind);
 388 
 389 jvmtiError       map2jvmtiError(jdwpError);
 390 jdwpError        map2jdwpError(jvmtiError);
 391 jdwpThreadStatus map2jdwpThreadStatus(jint state);
 392 jint             map2jdwpSuspendStatus(jint state);
 393 jint             map2jdwpClassStatus(jint);
 394 
 395 void log_debugee_location(const char *func,
 396                 jthread thread, jmethodID method, jlocation location);
 397 
 398 /*
 399  * Local Reference management. The two macros below are used
 400  * throughout the back end whenever space for JNI local references
 401  * is needed in the current frame.
 402  */
 403 
   1 /*
   2  * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  60     struct RefNode *next;       /* next RefNode* in bucket chain */
  61     jint         count;         /* count of references */
  62     unsigned     isStrong : 1;  /* 1 means this is a string reference */
  63 } RefNode;
  64 
  65 /* Value of a NULL ID */
  66 #define NULL_OBJECT_ID  ((jlong)0)
  67 
  68 /*
  69  * Globals used throughout the back end
  70  */
  71 
  72 typedef jint FrameNumber;
  73 
  74 typedef struct {
  75     jvmtiEnv *jvmti;
  76     JavaVM   *jvm;
  77     volatile jboolean vmDead; /* Once VM is dead it stays that way - don't put in init */
  78     jboolean assertOn;
  79     jboolean assertFatal;
  80     jboolean fibersSupported;      /* If true, debugging support for fibers is enabled.*/
  81     jboolean notifyDebuggerOfAllFibers; /* If true, the debugger will be notified of all known fibers.
  82                                          * If false the debugger is only notified of fibers for which
  83                                          * certain events have been received. */
  84     jboolean doerrorexit;
  85     jboolean modifiedUtf8;
  86     jboolean quiet;
  87 
  88     jboolean ignoreEvents;
  89 
  90     /* Debug flags (bit mask) */
  91     int      debugflags;
  92 
  93     /* Possible debug flags */
  94     #define USE_ITERATE_THROUGH_HEAP 0X001
  95 
  96     char * options;
  97 
  98     jclass              classClass;
  99     jclass              fiberClass;
 100     jclass              threadClass;
 101     jclass              threadGroupClass;
 102     jclass              classLoaderClass;
 103     jclass              stringClass;
 104     jclass              systemClass;
 105     jclass              innocuousThreadClass; /* fibers fixme: get rid of once helper threads go away */
 106     jmethodID           fiberToString;
 107     jmethodID           fiberTryMountAndSuspend;
 108     jmethodID           threadConstructor;
 109     jmethodID           threadSetDaemon;
 110     jmethodID           threadResume;
 111     jmethodID           systemGetProperty;
 112     jmethodID           setProperty;
 113     jthreadGroup        systemThreadGroup;
 114     jthreadGroup        fiberThreadGroup;
 115     jobject             agent_properties;
 116 
 117     jint                cachedJvmtiVersion;
 118     jvmtiCapabilities   cachedJvmtiCapabilities;
 119     jboolean            haveCachedJvmtiCapabilities;
 120     jvmtiEventCallbacks callbacks;
 121 
 122     /* Various property values we should grab on initialization */
 123     char* property_java_version;          /* UTF8 java.version */
 124     char* property_java_vm_name;          /* UTF8 java.vm.name */
 125     char* property_java_vm_info;          /* UTF8 java.vm.info */
 126     char* property_java_class_path;       /* UTF8 java.class.path */
 127     char* property_sun_boot_library_path; /* UTF8 sun.boot.library.path */
 128     char* property_path_separator;        /* UTF8 path.separator */
 129     char* property_user_dir;              /* UTF8 user.dir */
 130 
 131     unsigned log_flags;
 132 
 133     /* Common References static data */
 134     jrawMonitorID refLock;


 154         EI_SINGLE_STEP          =  1,
 155         EI_BREAKPOINT           =  2,
 156         EI_FRAME_POP            =  3,
 157         EI_EXCEPTION            =  4,
 158         EI_THREAD_START         =  5,
 159         EI_THREAD_END           =  6,
 160         EI_CLASS_PREPARE        =  7,
 161         EI_GC_FINISH            =  8,
 162         EI_CLASS_LOAD           =  9,
 163         EI_FIELD_ACCESS         = 10,
 164         EI_FIELD_MODIFICATION   = 11,
 165         EI_EXCEPTION_CATCH      = 12,
 166         EI_METHOD_ENTRY         = 13,
 167         EI_METHOD_EXIT          = 14,
 168         EI_MONITOR_CONTENDED_ENTER = 15,
 169         EI_MONITOR_CONTENDED_ENTERED = 16,
 170         EI_MONITOR_WAIT         = 17,
 171         EI_MONITOR_WAITED       = 18,
 172         EI_VM_INIT              = 19,
 173         EI_VM_DEATH             = 20,
 174         EI_FIBER_SCHEDULED      = 21,
 175         EI_FIBER_TERMINATED     = 22,
 176         EI_FIBER_MOUNT          = 23,
 177         EI_FIBER_UNMOUNT        = 24,
 178         EI_CONTINUATION_RUN     = 25,
 179         EI_CONTINUATION_YIELD   = 26,
 180 
 181         EI_max                  = 26
 182 } EventIndex;
 183 
 184 /* Agent errors that might be in a jvmtiError for JDWP or internal.
 185  *    (Done this way so that compiler allows it's use as a jvmtiError)
 186  */
 187 #define _AGENT_ERROR(x)                 ((jvmtiError)(JVMTI_ERROR_MAX+64+x))
 188 #define AGENT_ERROR_INTERNAL                    _AGENT_ERROR(1)
 189 #define AGENT_ERROR_VM_DEAD                     _AGENT_ERROR(2)
 190 #define AGENT_ERROR_NO_JNI_ENV                  _AGENT_ERROR(3)
 191 #define AGENT_ERROR_JNI_EXCEPTION               _AGENT_ERROR(4)
 192 #define AGENT_ERROR_JVMTI_INTERNAL              _AGENT_ERROR(5)
 193 #define AGENT_ERROR_JDWP_INTERNAL               _AGENT_ERROR(6)
 194 #define AGENT_ERROR_NOT_CURRENT_FRAME           _AGENT_ERROR(7)
 195 #define AGENT_ERROR_OUT_OF_MEMORY               _AGENT_ERROR(8)
 196 #define AGENT_ERROR_INVALID_TAG                 _AGENT_ERROR(9)
 197 #define AGENT_ERROR_ALREADY_INVOKING            _AGENT_ERROR(10)
 198 #define AGENT_ERROR_INVALID_INDEX               _AGENT_ERROR(11)
 199 #define AGENT_ERROR_INVALID_LENGTH              _AGENT_ERROR(12)
 200 #define AGENT_ERROR_INVALID_STRING              _AGENT_ERROR(13)
 201 #define AGENT_ERROR_INVALID_CLASS_LOADER        _AGENT_ERROR(14)
 202 #define AGENT_ERROR_INVALID_ARRAY               _AGENT_ERROR(15)
 203 #define AGENT_ERROR_TRANSPORT_LOAD              _AGENT_ERROR(16)
 204 #define AGENT_ERROR_TRANSPORT_INIT              _AGENT_ERROR(17)
 205 #define AGENT_ERROR_NATIVE_METHOD               _AGENT_ERROR(18)
 206 #define AGENT_ERROR_INVALID_COUNT               _AGENT_ERROR(19)
 207 #define AGENT_ERROR_INVALID_FRAMEID             _AGENT_ERROR(20)
 208 #define AGENT_ERROR_NULL_POINTER                _AGENT_ERROR(21)
 209 #define AGENT_ERROR_ILLEGAL_ARGUMENT            _AGENT_ERROR(22)
 210 #define AGENT_ERROR_INVALID_THREAD              _AGENT_ERROR(23)
 211 #define AGENT_ERROR_INVALID_EVENT_TYPE          _AGENT_ERROR(24)
 212 #define AGENT_ERROR_INVALID_OBJECT              _AGENT_ERROR(25)
 213 #define AGENT_ERROR_NO_MORE_FRAMES              _AGENT_ERROR(26)
 214 #define AGENT_ERROR_INVALID_MODULE              _AGENT_ERROR(27)
 215 
 216 /* Combined event information */
 217 
 218 typedef struct {
 219 
 220     EventIndex  ei;
 221     jthread     thread;
 222     jthread     fiber;        /* NULL if not running on a fiber. */
 223     jboolean    matchesFiber; /* true if the matching HandlerNode specified a fiber that matched,
 224                                  or the HandlerNode specified no thread and the event came in on a
 225                                  carrier thread running a fiber. */
 226     jclass      clazz;
 227     jmethodID   method;
 228     jlocation   location;
 229     jobject     object; /* possibly an exception or user object */
 230 
 231     union {
 232 
 233         /* ei = EI_FIELD_ACCESS */
 234         struct {
 235             jclass      field_clazz;
 236             jfieldID    field;
 237         } field_access;
 238 
 239         /* ei = EI_FIELD_MODIFICATION */
 240         struct {
 241             jclass      field_clazz;
 242             jfieldID    field;
 243             char        signature_type;
 244             jvalue      new_value;
 245         } field_modification;


 330 void sharedGetFieldValues(struct PacketInputStream *in,
 331                           struct PacketOutputStream *out,
 332                           jboolean isStatic);
 333 jboolean sharedInvoke(struct PacketInputStream *in,
 334                       struct PacketOutputStream *out);
 335 
 336 jvmtiError fieldSignature(jclass, jfieldID, char **, char **, char **);
 337 jvmtiError fieldModifiers(jclass, jfieldID, jint *);
 338 jvmtiError methodSignature(jmethodID, char **, char **, char **);
 339 jvmtiError methodReturnType(jmethodID, char *);
 340 jvmtiError methodModifiers(jmethodID, jint *);
 341 jvmtiError methodClass(jmethodID, jclass *);
 342 jvmtiError methodLocation(jmethodID, jlocation*, jlocation*);
 343 jvmtiError classLoader(jclass, jobject *);
 344 
 345 /*
 346  * Thin wrappers on top of JNI
 347  */
 348 JNIEnv *getEnv(void);
 349 jboolean isClass(jobject object);
 350 jboolean isFiber(jobject object);
 351 jboolean isThread(jobject object);
 352 jboolean isThreadGroup(jobject object);
 353 jboolean isString(jobject object);
 354 jboolean isClassLoader(jobject object);
 355 jboolean isArray(jobject object);
 356 
 357 /*
 358  * Thin wrappers on top of JVMTI
 359  */
 360 jvmtiError jvmtiGetCapabilities(jvmtiCapabilities *caps);
 361 jint jvmtiMajorVersion(void);
 362 jint jvmtiMinorVersion(void);
 363 jint jvmtiMicroVersion(void);
 364 jvmtiError getSourceDebugExtension(jclass clazz, char **extensionPtr);
 365 jboolean canSuspendResumeThreadLists(void);
 366 
 367 jrawMonitorID debugMonitorCreate(char *name);
 368 void debugMonitorEnter(jrawMonitorID theLock);
 369 void debugMonitorExit(jrawMonitorID theLock);
 370 void debugMonitorWait(jrawMonitorID theLock);


 374 void debugMonitorDestroy(jrawMonitorID theLock);
 375 
 376 jthread *allThreads(jint *count);
 377 
 378 void threadGroupInfo(jthreadGroup, jvmtiThreadGroupInfo *info);
 379 
 380 jclass findClass(JNIEnv *env, const char * name);
 381 jmethodID getMethod(JNIEnv *env, jclass clazz, const char * name, const char *signature);
 382 char *getModuleName(jclass);
 383 char *getClassname(jclass);
 384 jvmtiError classSignature(jclass, char**, char**);
 385 jint classStatus(jclass);
 386 void writeGenericSignature(struct PacketOutputStream *, char *);
 387 jboolean isMethodNative(jmethodID);
 388 jboolean isMethodObsolete(jmethodID);
 389 jvmtiError isMethodSynthetic(jmethodID, jboolean*);
 390 jvmtiError isFieldSynthetic(jclass, jfieldID, jboolean*);
 391 
 392 jboolean isSameObject(JNIEnv *env, jobject o1, jobject o2);
 393 
 394 jthread  getThreadFiber(jthread thread);
 395 jthread  getFiberThread(jthread fiber);
 396 
 397 jint getThreadFrameCount(jthread thread);
 398 
 399 jint objectHashCode(jobject);
 400 
 401 jvmtiError allInterfaces(jclass clazz, jclass **ppinterfaces, jint *count);
 402 jvmtiError allLoadedClasses(jclass **ppclasses, jint *count);
 403 jvmtiError allClassLoaderClasses(jobject loader, jclass **ppclasses, jint *count);
 404 jvmtiError allNestedClasses(jclass clazz, jclass **ppnested, jint *pcount);
 405 
 406 void setAgentPropertyValue(JNIEnv *env, char *propertyName, char* propertyValue);
 407 
 408 void *jvmtiAllocate(jint numBytes);
 409 void jvmtiDeallocate(void *buffer);
 410 
 411 void             eventIndexInit(void);
 412 char*            eventIndex2EventName(EventIndex ei);
 413 jdwpEvent        eventIndex2jdwp(EventIndex i);
 414 jvmtiEvent       eventIndex2jvmti(EventIndex i);
 415 EventIndex       jdwp2EventIndex(jdwpEvent eventType);
 416 EventIndex       jvmti2EventIndex(jvmtiEvent kind);
 417 
 418 jvmtiError       map2jvmtiError(jdwpError);
 419 jdwpError        map2jdwpError(jvmtiError);
 420 jdwpThreadStatus map2jdwpThreadStatus(jint state);
 421 jint             map2jdwpSuspendStatus(jint state);
 422 jint             map2jdwpClassStatus(jint);
 423 
 424 void log_debugee_location(const char *func,
 425                 jthread thread, jmethodID method, jlocation location);
 426 
 427 /*
 428  * Local Reference management. The two macros below are used
 429  * throughout the back end whenever space for JNI local references
 430  * is needed in the current frame.
 431  */
 432 
< prev index next >