⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jvmdi.h

📁 java scjp考试必备.scjp模块考试最优秀经典之作,运行里只需要java环境支持,使用方便简单.
💻 H
📖 第 1 页 / 共 3 页
字号:
/* * @(#)jvmdi.h	1.37 98/09/22 * * Copyright 1997, 1998 by Sun Microsystems, Inc., * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. * All rights reserved. * * This software is the confidential and proprietary information * of Sun Microsystems, Inc. ("Confidential Information").  You * shall not disclose such Confidential Information and shall use * it only in accordance with the terms of the license agreement * you entered into with Sun. *//* *   Java Virtual Machine Debug Interface * *   Defines debugging functionality that a VM should provide.   * *   Should not overlap functionality in jni.h */#ifndef _JAVASOFT_JVMDI_H_#define _JAVASOFT_JVMDI_H_#include "jni.h"#define JVMDI_VERSION_1 0x20010000#ifdef __cplusplusextern "C" {#endiftypedef jobject jthread;typedef jobject jthreadGroup;struct _jframeID;typedef struct _jframeID *jframeID;  /* specifies program location "pc" - often byte code index */typedef jlong jlocation;  /*   *  Errors   */typedef jint jvmdiError;  /* no error */#define JVMDI_ERROR_NONE                 ((jvmdiError)0)  /*   * Errors on thread operations   */  /* invalid thread */#define JVMDI_ERROR_INVALID_THREAD       ((jvmdiError)10)  /* invalid thread group */#define JVMDI_ERROR_INVALID_THREAD_GROUP ((jvmdiError)11)  /* invalid thread priority */#define JVMDI_ERROR_INVALID_PRIORITY     ((jvmdiError)12)  /* thread not suspended */#define JVMDI_ERROR_THREAD_NOT_SUSPENDED ((jvmdiError)13)  /* thread already suspended */#define JVMDI_ERROR_THREAD_SUSPENDED     ((jvmdiError)14)  /*    * Errors on object and class operations   */  /* invalid object (implementation not required to gracefully catch) */#define JVMDI_ERROR_INVALID_OBJECT       ((jvmdiError)20)  /* invalid class (implementation not required to gracefully catch) */#define JVMDI_ERROR_INVALID_CLASS        ((jvmdiError)21)  /* class not prepared */#define JVMDI_ERROR_CLASS_NOT_PREPARED   ((jvmdiError)22)  /* invalid methodID (implementation not required to gracefully catch) */#define JVMDI_ERROR_INVALID_METHODID     ((jvmdiError)23)  /* invalid location */#define JVMDI_ERROR_INVALID_LOCATION     ((jvmdiError)24)  /* invalid fieldID (implementation not required to gracefully catch) */#define JVMDI_ERROR_INVALID_FIELDID      ((jvmdiError)25)  /*   * Errors on frame operations   */  /* invalid frameID (implementation not required to gracefully catch) */#define JVMDI_ERROR_INVALID_FRAMEID      ((jvmdiError)30)  /* there are no more frames on the stack */#define JVMDI_ERROR_NO_MORE_FRAMES       ((jvmdiError)31)  /* operation cannot be performed on this frame */#define JVMDI_ERROR_OPAQUE_FRAME         ((jvmdiError)32)  /* operation can only be performed on current frame */#define JVMDI_ERROR_NOT_CURRENT_FRAME    ((jvmdiError)33)  /* type mismatch (implementation not required to gracefully catch) */#define JVMDI_ERROR_TYPE_MISMATCH        ((jvmdiError)34)  /* invalid slot */#define JVMDI_ERROR_INVALID_SLOT         ((jvmdiError)35)  /*   * Errors on set/clear/find operations   */  /* item already present */#define JVMDI_ERROR_DUPLICATE            ((jvmdiError)40)  /* item not found */#define JVMDI_ERROR_NOT_FOUND            ((jvmdiError)41)  /*   * Errors on monitor operations   */  /* invalid monitor */#define JVMDI_ERROR_INVALID_MONITOR      ((jvmdiError)50)  /* wait, notify, notify all tried without entering monitor  */#define JVMDI_ERROR_NOT_MONITOR_OWNER    ((jvmdiError)51)  /* waiting thread interrupted */#define JVMDI_ERROR_INTERRUPT            ((jvmdiError)52)    /*   * Class redefinition / operand stack errors   */  /* The equivalent of ClassFormatError */#define JVMDI_ERROR_INVALID_CLASS_FORMAT          ((jvmdiError)60)  /* The equivalent of ClassCircularityError */#define JVMDI_ERROR_CIRCULAR_CLASS_DEFINITION     ((jvmdiError)61)  /* The class bytes fail verification */#define JVMDI_ERROR_FAILS_VERIFICATION            ((jvmdiError)62)  /* Cannot add new methods to an existing class */#define JVMDI_ERROR_ADD_METHOD_NOT_IMPLEMENTED    ((jvmdiError)63)  /* Cannot change fields of an existing class */#define JVMDI_ERROR_SCHEMA_CHANGE_NOT_IMPLEMENTED ((jvmdiError)64)  /* bci/operand stack/local var combination is not verifiably type safe */#define JVMDI_ERROR_INVALID_TYPESTATE             ((jvmdiError)65)  /*   * Miscellaneous errors   */  /* Not yet implemented */#define JVMDI_ERROR_NOT_IMPLEMENTED      ((jvmdiError)99)  /* null pointer */#define JVMDI_ERROR_NULL_POINTER         ((jvmdiError)100)  /* information is absent */#define JVMDI_ERROR_ABSENT_INFORMATION   ((jvmdiError)101)  /* invalid event type  */#define JVMDI_ERROR_INVALID_EVENT_TYPE   ((jvmdiError)102)  /* invalid argument  */#define JVMDI_ERROR_ILLEGAL_ARGUMENT     ((jvmdiError)103)  /*   * Universal errors. These errors may be returned by   * any JVMDI function, not just the ones for which they are listed   * below.   */  /* no more memory available for allocation */#define JVMDI_ERROR_OUT_OF_MEMORY        ((jvmdiError)110)  /* debugging has not been enabled in this VM */#define JVMDI_ERROR_ACCESS_DENIED        ((jvmdiError)111)  /* VM is dead (implementation not required to gracefully catch) */#define JVMDI_ERROR_VM_DEAD              ((jvmdiError)112)  /* internal error  */#define JVMDI_ERROR_INTERNAL             ((jvmdiError)113)  /* Thread calling JVMDI function not attached to VM */#define JVMDI_ERROR_UNATTACHED_THREAD    ((jvmdiError)115)  /*   *  Threads   */  /* Thread status is unknown */#define JVMDI_THREAD_STATUS_UNKNOWN      ((jint)-1)  /* Thread is waiting to die */#define JVMDI_THREAD_STATUS_ZOMBIE       ((jint)0)  /* Thread is runnable */#define JVMDI_THREAD_STATUS_RUNNING      ((jint)1)  /* Thread is sleeping - Thread.sleep() or JVM_Sleep() was called */#define JVMDI_THREAD_STATUS_SLEEPING     ((jint)2)  /* Thread is waiting on a java monitor */#define JVMDI_THREAD_STATUS_MONITOR      ((jint)3)  /* Thread is waiting - Thread.wait() or JVM_MonitorWait() was called */#define JVMDI_THREAD_STATUS_WAIT         ((jint)4)  /* Thread is suspended - Thread.suspend(), JVM_Suspend() or   * JVMDI_Suspend was called */#define JVMDI_SUSPEND_STATUS_SUSPENDED   ((jint)0x1)  /* Thread is at a breakpoint */#define JVMDI_SUSPEND_STATUS_BREAK       ((jint)0x2)  /* Thread priority constants */#define JVMDI_THREAD_MIN_PRIORITY   ((jint)1)#define JVMDI_THREAD_NORM_PRIORITY  ((jint)5)#define JVMDI_THREAD_MAX_PRIORITY   ((jint)10)typedef struct {    char *name;    jint  priority;    jboolean is_daemon;    jthreadGroup thread_group;    jobject context_class_loader;} JVMDI_thread_info;typedef struct {    jthreadGroup parent;    char *name;    jint  max_priority;    jboolean is_daemon;} JVMDI_thread_group_info;#define JVMDI_DISABLE ((jint) 0)#define JVMDI_ENABLE  ((jint) 1)/* * Initial function for debug threads created through JVMDI */typedef void (*JVMDI_StartFunction)(void *);/* * Type for debug monitors created through JVMDI */typedef void *JVMDI_RawMonitor;#define JVMDI_MONITOR_WAIT_FOREVER ((jlong)(-1))/* * Monitor information */typedef struct {    jthread owner;    jint entry_count;    jint waiter_count;    jthread *waiters;} JVMDI_monitor_info;typedef struct {    jint owned_monitor_count;    jobject *owned_monitors;} JVMDI_owned_monitor_info;  /*   *  Events   */    /* kind = JVMDI_EVENT_SINGLE_STEP */    typedef struct {         jthread thread;        jclass clazz;        jmethodID method;        jlocation location;    } JVMDI_single_step_event_data;			    /* kind = JVMDI_EVENT_BREAKPOINT */    typedef struct {         jthread thread;        jclass clazz;        jmethodID method;        jlocation location;    } JVMDI_breakpoint_event_data;        /* kind = JVMDI_EVENT_FIELD_ACCESS */    typedef struct {         jthread thread;        jclass clazz;        jmethodID method;        jlocation location;        jclass field_clazz;        jobject object;        jfieldID field;    } JVMDI_field_access_event_data;        /* kind = JVMDI_EVENT_FIELD_MODIFICATION */    typedef struct {         jthread thread;        jclass clazz;        jmethodID method;        jlocation location;        jclass field_clazz;        jobject object;        jfieldID field;        char signature_type;        jvalue new_value;    } JVMDI_field_modification_event_data;        /* kind = JVMDI_EVENT_FRAME_POP */    /* kind = JVMDI_EVENT_METHOD_ENTRY */    /* kind = JVMDI_EVENT_METHOD_EXIT */    typedef struct {         jthread thread;        jclass clazz;        jmethodID method;        jframeID frame;    } JVMDI_frame_event_data;        /* kind = JVMDI_EVENT_EXCEPTION */    typedef struct {         jthread thread;        jclass clazz;        jmethodID method;        jlocation location;        jobject exception;        jclass catch_clazz;        jmethodID catch_method;        jlocation catch_location;    } JVMDI_exception_event_data;        /* kind = JVMDI_EVENT_EXCEPTION_CATCH */    typedef struct {         jthread thread;        jclass clazz;        jmethodID method;        jlocation location;        jobject exception;    } JVMDI_exception_catch_event_data;        /* kind = JVMDI_EVENT_USER_DEFINED */    typedef struct {         jobject object;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -