svn-gvsig-desktop / trunk / libraries / libjni-gdal / include / jni_linux / jvmdi.h @ 5888
History | View | Annotate | Download (38.4 KB)
1 |
/*
|
---|---|
2 |
* @(#)jvmdi.h 1.47 03/01/23
|
3 |
*
|
4 |
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
|
5 |
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
6 |
*/
|
7 |
|
8 |
/*
|
9 |
* Java Virtual Machine Debug Interface
|
10 |
*
|
11 |
* Defines debugging functionality that a VM should provide.
|
12 |
*
|
13 |
* Should not overlap functionality in jni.h
|
14 |
*/
|
15 |
|
16 |
#ifndef _JAVASOFT_JVMDI_H_
|
17 |
#define _JAVASOFT_JVMDI_H_
|
18 |
|
19 |
#include "jni.h" |
20 |
|
21 |
#define JVMDI_VERSION_1 0x20010000 |
22 |
#define JVMDI_VERSION_1_1 0x20010001 |
23 |
#define JVMDI_VERSION_1_2 0x20010002 |
24 |
#define JVMDI_VERSION_1_3 0x20010003 |
25 |
|
26 |
#ifdef __cplusplus
|
27 |
extern "C" { |
28 |
#endif
|
29 |
|
30 |
typedef jobject jthread;
|
31 |
|
32 |
typedef jobject jthreadGroup;
|
33 |
|
34 |
struct _jframeID;
|
35 |
typedef struct _jframeID *jframeID; |
36 |
|
37 |
/* specifies program location "pc" - often byte code index */
|
38 |
typedef jlong jlocation;
|
39 |
|
40 |
/* The jmethodID for methods that have been replaced */
|
41 |
/* via RedefineClasses - used when the implementation */
|
42 |
/* does not wish to retain replaced jmethodIDs */
|
43 |
#define OBSOLETE_METHOD_ID ((jmethodID)(NULL)) |
44 |
|
45 |
/*
|
46 |
* Errors
|
47 |
*/
|
48 |
|
49 |
typedef jint jvmdiError;
|
50 |
|
51 |
/* no error */
|
52 |
#define JVMDI_ERROR_NONE ((jvmdiError)0) |
53 |
|
54 |
/*
|
55 |
* Errors on thread operations
|
56 |
*/
|
57 |
|
58 |
/* invalid thread */
|
59 |
#define JVMDI_ERROR_INVALID_THREAD ((jvmdiError)10) |
60 |
/* invalid thread group */
|
61 |
#define JVMDI_ERROR_INVALID_THREAD_GROUP ((jvmdiError)11) |
62 |
/* invalid thread priority */
|
63 |
#define JVMDI_ERROR_INVALID_PRIORITY ((jvmdiError)12) |
64 |
/* thread not suspended */
|
65 |
#define JVMDI_ERROR_THREAD_NOT_SUSPENDED ((jvmdiError)13) |
66 |
/* thread already suspended */
|
67 |
#define JVMDI_ERROR_THREAD_SUSPENDED ((jvmdiError)14) |
68 |
|
69 |
/*
|
70 |
* Errors on object and class operations
|
71 |
*/
|
72 |
|
73 |
/* invalid object (implementation not required to gracefully catch) */
|
74 |
#define JVMDI_ERROR_INVALID_OBJECT ((jvmdiError)20) |
75 |
/* invalid class (implementation not required to gracefully catch) */
|
76 |
#define JVMDI_ERROR_INVALID_CLASS ((jvmdiError)21) |
77 |
/* class not prepared */
|
78 |
#define JVMDI_ERROR_CLASS_NOT_PREPARED ((jvmdiError)22) |
79 |
/* invalid methodID (implementation not required to gracefully catch) */
|
80 |
#define JVMDI_ERROR_INVALID_METHODID ((jvmdiError)23) |
81 |
/* invalid location */
|
82 |
#define JVMDI_ERROR_INVALID_LOCATION ((jvmdiError)24) |
83 |
/* invalid fieldID (implementation not required to gracefully catch) */
|
84 |
#define JVMDI_ERROR_INVALID_FIELDID ((jvmdiError)25) |
85 |
|
86 |
/*
|
87 |
* Errors on frame operations
|
88 |
*/
|
89 |
|
90 |
/* invalid frameID (implementation not required to gracefully catch) */
|
91 |
#define JVMDI_ERROR_INVALID_FRAMEID ((jvmdiError)30) |
92 |
/* there are no more frames on the stack */
|
93 |
#define JVMDI_ERROR_NO_MORE_FRAMES ((jvmdiError)31) |
94 |
/* operation cannot be performed on this frame */
|
95 |
#define JVMDI_ERROR_OPAQUE_FRAME ((jvmdiError)32) |
96 |
/* operation can only be performed on current frame */
|
97 |
#define JVMDI_ERROR_NOT_CURRENT_FRAME ((jvmdiError)33) |
98 |
/* type mismatch (implementation not required to gracefully catch) */
|
99 |
#define JVMDI_ERROR_TYPE_MISMATCH ((jvmdiError)34) |
100 |
/* invalid slot */
|
101 |
#define JVMDI_ERROR_INVALID_SLOT ((jvmdiError)35) |
102 |
|
103 |
/*
|
104 |
* Errors on set/clear/find operations
|
105 |
*/
|
106 |
|
107 |
/* item already present */
|
108 |
#define JVMDI_ERROR_DUPLICATE ((jvmdiError)40) |
109 |
/* item not found */
|
110 |
#define JVMDI_ERROR_NOT_FOUND ((jvmdiError)41) |
111 |
|
112 |
/*
|
113 |
* Errors on monitor operations
|
114 |
*/
|
115 |
|
116 |
/* invalid monitor */
|
117 |
#define JVMDI_ERROR_INVALID_MONITOR ((jvmdiError)50) |
118 |
/* wait, notify, notify all tried without entering monitor */
|
119 |
#define JVMDI_ERROR_NOT_MONITOR_OWNER ((jvmdiError)51) |
120 |
/* waiting thread interrupted */
|
121 |
#define JVMDI_ERROR_INTERRUPT ((jvmdiError)52) |
122 |
|
123 |
/*
|
124 |
* Class redefinition / operand stack errors
|
125 |
*/
|
126 |
|
127 |
/* The equivalent of ClassFormatError */
|
128 |
#define JVMDI_ERROR_INVALID_CLASS_FORMAT ((jvmdiError)60) |
129 |
/* The equivalent of ClassCircularityError */
|
130 |
#define JVMDI_ERROR_CIRCULAR_CLASS_DEFINITION ((jvmdiError)61) |
131 |
/* The class bytes fail verification */
|
132 |
#define JVMDI_ERROR_FAILS_VERIFICATION ((jvmdiError)62) |
133 |
/* The new class version adds new methods */
|
134 |
/* and can_add_method is false */
|
135 |
#define JVMDI_ERROR_ADD_METHOD_NOT_IMPLEMENTED ((jvmdiError)63) |
136 |
/* The new class version changes fields */
|
137 |
/* and can_unrestrictedly_redefine_classes is false */
|
138 |
#define JVMDI_ERROR_SCHEMA_CHANGE_NOT_IMPLEMENTED ((jvmdiError)64) |
139 |
/* bci/operand stack/local var combination is not verifiably */
|
140 |
/* type safe */
|
141 |
#define JVMDI_ERROR_INVALID_TYPESTATE ((jvmdiError)65) |
142 |
/* A direct superclass is different for the new class */
|
143 |
/* version, or the set of directly implemented */
|
144 |
/* interfaces is different */
|
145 |
/* and can_unrestrictedly_redefine_classes is false */
|
146 |
#define JVMDI_ERROR_HIERARCHY_CHANGE_NOT_IMPLEMENTED ((jvmdiError)66) |
147 |
/* The new class version does not declare a method */
|
148 |
/* declared in the old class version */
|
149 |
/* and can_unrestrictedly_redefine_classes is false */
|
150 |
#define JVMDI_ERROR_DELETE_METHOD_NOT_IMPLEMENTED ((jvmdiError)67) |
151 |
/* A class file has a version number not supported */
|
152 |
/* by this VM. */
|
153 |
#define JVMDI_ERROR_UNSUPPORTED_VERSION ((jvmdiError)68) |
154 |
/* The class name defined in the new class file is */
|
155 |
/* different from the name in the old class object */
|
156 |
#define JVMDI_ERROR_NAMES_DONT_MATCH ((jvmdiError)69) |
157 |
/* The new class version has different modifiers and */
|
158 |
/* can_unrestrictedly_redefine_classes is false */
|
159 |
#define JVMDI_ERROR_CLASS_MODIFIERS_CHANGE_NOT_IMPLEMENTED ((jvmdiError)70) |
160 |
/* A method in the new class version has different modifiers */
|
161 |
/* than its counterpart in the old class version */
|
162 |
/* and can_unrestrictedly_redefine_classes is false */
|
163 |
#define JVMDI_ERROR_METHOD_MODIFIERS_CHANGE_NOT_IMPLEMENTED ((jvmdiError)71) |
164 |
|
165 |
/*
|
166 |
* Miscellaneous errors
|
167 |
*/
|
168 |
|
169 |
/* Not yet implemented */
|
170 |
#define JVMDI_ERROR_NOT_IMPLEMENTED ((jvmdiError)99) |
171 |
/* null pointer */
|
172 |
#define JVMDI_ERROR_NULL_POINTER ((jvmdiError)100) |
173 |
/* information is absent */
|
174 |
#define JVMDI_ERROR_ABSENT_INFORMATION ((jvmdiError)101) |
175 |
/* invalid event type */
|
176 |
#define JVMDI_ERROR_INVALID_EVENT_TYPE ((jvmdiError)102) |
177 |
/* invalid argument */
|
178 |
#define JVMDI_ERROR_ILLEGAL_ARGUMENT ((jvmdiError)103) |
179 |
|
180 |
/*
|
181 |
* Universal errors. These errors may be returned by
|
182 |
* any JVMDI function, not just the ones for which they are listed
|
183 |
* below.
|
184 |
*/
|
185 |
|
186 |
/* no more memory available for allocation */
|
187 |
#define JVMDI_ERROR_OUT_OF_MEMORY ((jvmdiError)110) |
188 |
/* debugging has not been enabled in this VM */
|
189 |
#define JVMDI_ERROR_ACCESS_DENIED ((jvmdiError)111) |
190 |
/* VM is dead (implementation not required to gracefully catch) */
|
191 |
#define JVMDI_ERROR_VM_DEAD ((jvmdiError)112) |
192 |
/* internal error */
|
193 |
#define JVMDI_ERROR_INTERNAL ((jvmdiError)113) |
194 |
/* Thread calling JVMDI function not attached to VM */
|
195 |
#define JVMDI_ERROR_UNATTACHED_THREAD ((jvmdiError)115) |
196 |
|
197 |
|
198 |
/*
|
199 |
* Threads
|
200 |
*/
|
201 |
|
202 |
/* Thread status is unknown */
|
203 |
#define JVMDI_THREAD_STATUS_UNKNOWN ((jint)-1) |
204 |
/* Thread is waiting to die */
|
205 |
#define JVMDI_THREAD_STATUS_ZOMBIE ((jint)0) |
206 |
/* Thread is runnable */
|
207 |
#define JVMDI_THREAD_STATUS_RUNNING ((jint)1) |
208 |
/* Thread is sleeping - Thread.sleep() or JVM_Sleep() was called */
|
209 |
#define JVMDI_THREAD_STATUS_SLEEPING ((jint)2) |
210 |
/* Thread is waiting on a java monitor */
|
211 |
#define JVMDI_THREAD_STATUS_MONITOR ((jint)3) |
212 |
/* Thread is waiting - Thread.wait() or JVM_MonitorWait() was called */
|
213 |
#define JVMDI_THREAD_STATUS_WAIT ((jint)4) |
214 |
|
215 |
/* Thread is suspended - Thread.suspend(), JVM_Suspend() or
|
216 |
* JVMDI_Suspend was called */
|
217 |
#define JVMDI_SUSPEND_STATUS_SUSPENDED ((jint)0x1) |
218 |
/* Thread is at a breakpoint */
|
219 |
#define JVMDI_SUSPEND_STATUS_BREAK ((jint)0x2) |
220 |
|
221 |
|
222 |
/* Thread priority constants */
|
223 |
#define JVMDI_THREAD_MIN_PRIORITY ((jint)1) |
224 |
#define JVMDI_THREAD_NORM_PRIORITY ((jint)5) |
225 |
#define JVMDI_THREAD_MAX_PRIORITY ((jint)10) |
226 |
|
227 |
typedef struct { |
228 |
char *name;
|
229 |
jint priority; |
230 |
jboolean is_daemon; |
231 |
jthreadGroup thread_group; |
232 |
jobject context_class_loader; |
233 |
} JVMDI_thread_info; |
234 |
|
235 |
typedef struct { |
236 |
jthreadGroup parent; |
237 |
char *name;
|
238 |
jint max_priority; |
239 |
jboolean is_daemon; |
240 |
} JVMDI_thread_group_info; |
241 |
|
242 |
#define JVMDI_DISABLE ((jint) 0) |
243 |
#define JVMDI_ENABLE ((jint) 1) |
244 |
|
245 |
/*
|
246 |
* Initial function for debug threads created through JVMDI
|
247 |
*/
|
248 |
typedef void (*JVMDI_StartFunction)(void *); |
249 |
|
250 |
/*
|
251 |
* Type for debug monitors created through JVMDI
|
252 |
*/
|
253 |
typedef void *JVMDI_RawMonitor; |
254 |
|
255 |
#define JVMDI_MONITOR_WAIT_FOREVER ((jlong)(-1)) |
256 |
|
257 |
/*
|
258 |
* Monitor information
|
259 |
*/
|
260 |
typedef struct { |
261 |
jthread owner; |
262 |
jint entry_count; |
263 |
jint waiter_count; |
264 |
jthread *waiters; |
265 |
} JVMDI_monitor_info; |
266 |
|
267 |
typedef struct { |
268 |
jint owned_monitor_count; |
269 |
jobject *owned_monitors; |
270 |
} JVMDI_owned_monitor_info; |
271 |
|
272 |
/*
|
273 |
* Events
|
274 |
*/
|
275 |
|
276 |
/* kind = JVMDI_EVENT_SINGLE_STEP */
|
277 |
typedef struct { |
278 |
jthread thread; |
279 |
jclass clazz; |
280 |
jmethodID method; |
281 |
jlocation location; |
282 |
} JVMDI_single_step_event_data; |
283 |
|
284 |
/* kind = JVMDI_EVENT_BREAKPOINT */
|
285 |
typedef struct { |
286 |
jthread thread; |
287 |
jclass clazz; |
288 |
jmethodID method; |
289 |
jlocation location; |
290 |
} JVMDI_breakpoint_event_data; |
291 |
|
292 |
/* kind = JVMDI_EVENT_FIELD_ACCESS */
|
293 |
typedef struct { |
294 |
jthread thread; |
295 |
jclass clazz; |
296 |
jmethodID method; |
297 |
jlocation location; |
298 |
jclass field_clazz; |
299 |
jobject object; |
300 |
jfieldID field; |
301 |
} JVMDI_field_access_event_data; |
302 |
|
303 |
/* kind = JVMDI_EVENT_FIELD_MODIFICATION */
|
304 |
typedef struct { |
305 |
jthread thread; |
306 |
jclass clazz; |
307 |
jmethodID method; |
308 |
jlocation location; |
309 |
jclass field_clazz; |
310 |
jobject object; |
311 |
jfieldID field; |
312 |
char signature_type;
|
313 |
jvalue new_value; |
314 |
} JVMDI_field_modification_event_data; |
315 |
|
316 |
/* kind = JVMDI_EVENT_FRAME_POP */
|
317 |
/* kind = JVMDI_EVENT_METHOD_ENTRY */
|
318 |
/* kind = JVMDI_EVENT_METHOD_EXIT */
|
319 |
typedef struct { |
320 |
jthread thread; |
321 |
jclass clazz; |
322 |
jmethodID method; |
323 |
jframeID frame; |
324 |
} JVMDI_frame_event_data; |
325 |
|
326 |
/* kind = JVMDI_EVENT_EXCEPTION */
|
327 |
typedef struct { |
328 |
jthread thread; |
329 |
jclass clazz; |
330 |
jmethodID method; |
331 |
jlocation location; |
332 |
jobject exception; |
333 |
jclass catch_clazz; |
334 |
jmethodID catch_method; |
335 |
jlocation catch_location; |
336 |
} JVMDI_exception_event_data; |
337 |
|
338 |
/* kind = JVMDI_EVENT_EXCEPTION_CATCH */
|
339 |
typedef struct { |
340 |
jthread thread; |
341 |
jclass clazz; |
342 |
jmethodID method; |
343 |
jlocation location; |
344 |
jobject exception; |
345 |
} JVMDI_exception_catch_event_data; |
346 |
|
347 |
/* kind = JVMDI_EVENT_USER_DEFINED */
|
348 |
typedef struct { |
349 |
jobject object; |
350 |
jint key; |
351 |
} JVMDI_user_event_data; |
352 |
|
353 |
/* kind = JVMDI_EVENT_THREAD_END or */
|
354 |
/* JVMDI_EVENT_THREAD_START */
|
355 |
typedef struct { |
356 |
jthread thread; |
357 |
} JVMDI_thread_change_event_data; |
358 |
|
359 |
/* kind = JVMDI_EVENT_CLASS_LOAD, */
|
360 |
/* JVMDI_EVENT_CLASS_UNLOAD, or */
|
361 |
/* JVMDI_EVENT_CLASS_PREPARE */
|
362 |
typedef struct { |
363 |
jthread thread; |
364 |
jclass clazz; |
365 |
} JVMDI_class_event_data; |
366 |
|
367 |
/* This stucture passes information about the event.
|
368 |
* location is the index of the last instruction executed.
|
369 |
*/
|
370 |
typedef struct { |
371 |
jint kind; /* the discriminant */
|
372 |
|
373 |
union {
|
374 |
/* kind = JVMDI_EVENT_SINGLE_STEP */
|
375 |
JVMDI_single_step_event_data single_step; |
376 |
|
377 |
/* kind = JVMDI_EVENT_BREAKPOINT */
|
378 |
JVMDI_breakpoint_event_data breakpoint; |
379 |
|
380 |
/* kind = JVMDI_EVENT_FRAME_POP */
|
381 |
/* kind = JVMDI_EVENT_METHOD_ENTRY */
|
382 |
/* kind = JVMDI_EVENT_METHOD_EXIT */
|
383 |
JVMDI_frame_event_data frame; |
384 |
|
385 |
/* kind = JVMDI_EVENT_FIELD_ACCESS */
|
386 |
JVMDI_field_access_event_data field_access; |
387 |
|
388 |
/* kind = JVMDI_EVENT_FIELD_MODIFICATION */
|
389 |
JVMDI_field_modification_event_data field_modification; |
390 |
|
391 |
/* kind = JVMDI_EVENT_EXCEPTION */
|
392 |
JVMDI_exception_event_data exception; |
393 |
|
394 |
/* kind = JVMDI_EVENT_EXCEPTION_CATCH */
|
395 |
JVMDI_exception_catch_event_data exception_catch; |
396 |
|
397 |
/* kind = JVMDI_EVENT_USER_DEFINED */
|
398 |
JVMDI_user_event_data user; |
399 |
|
400 |
/* kind = JVMDI_EVENT_THREAD_END or */
|
401 |
/* JVMDI_EVENT_THREAD_START */
|
402 |
JVMDI_thread_change_event_data thread_change; |
403 |
|
404 |
/* kind = JVMDI_EVENT_CLASS_LOAD, */
|
405 |
/* JVMDI_EVENT_CLASS_UNLOAD, or */
|
406 |
/* JVMDI_EVENT_CLASS_PREPARE */
|
407 |
JVMDI_class_event_data class_event; |
408 |
|
409 |
/* kind = JVMDI_EVENT_VM_DEATH, JVMDI_EVENT_VM_INIT */
|
410 |
/* no additional fields */
|
411 |
} u; |
412 |
} JVMDI_Event; |
413 |
|
414 |
/*** event kinds ***/
|
415 |
#define JVMDI_EVENT_SINGLE_STEP ((jint)1) |
416 |
#define JVMDI_EVENT_BREAKPOINT ((jint)2) |
417 |
#define JVMDI_EVENT_FRAME_POP ((jint)3) |
418 |
#define JVMDI_EVENT_EXCEPTION ((jint)4) |
419 |
#define JVMDI_EVENT_USER_DEFINED ((jint)5) |
420 |
#define JVMDI_EVENT_THREAD_START ((jint)6) |
421 |
#define JVMDI_EVENT_THREAD_END ((jint)7) |
422 |
#define JVMDI_EVENT_CLASS_PREPARE ((jint)8) |
423 |
#define JVMDI_EVENT_CLASS_UNLOAD ((jint)9) |
424 |
#define JVMDI_EVENT_CLASS_LOAD ((jint)10) |
425 |
#define JVMDI_EVENT_FIELD_ACCESS ((jint)20) |
426 |
#define JVMDI_EVENT_FIELD_MODIFICATION ((jint)21) |
427 |
#define JVMDI_EVENT_EXCEPTION_CATCH ((jint)30) |
428 |
#define JVMDI_EVENT_METHOD_ENTRY ((jint)40) |
429 |
#define JVMDI_EVENT_METHOD_EXIT ((jint)41) |
430 |
#define JVMDI_EVENT_VM_INIT ((jint)90) |
431 |
#define JVMDI_EVENT_VM_DEATH ((jint)99) |
432 |
|
433 |
#define JVMDI_MAX_EVENT_TYPE_VAL ((jint)99) |
434 |
|
435 |
|
436 |
|
437 |
/* event handler hook */
|
438 |
typedef void (*JVMDI_EventHook)(JNIEnv *env, JVMDI_Event *event); |
439 |
|
440 |
typedef jvmdiError (*JVMDI_AllocHook) (jlong size, jbyte** memPtr);
|
441 |
typedef jvmdiError (*JVMDI_DeallocHook) (jbyte* buffer);
|
442 |
|
443 |
/*
|
444 |
* Class states used in JVMDI_GetClassStatus
|
445 |
*/
|
446 |
#define JVMDI_CLASS_STATUS_VERIFIED ((jint)0x01) |
447 |
#define JVMDI_CLASS_STATUS_PREPARED ((jint)0x02) |
448 |
#define JVMDI_CLASS_STATUS_INITIALIZED ((jint)0x04) |
449 |
/* Error prevents initialization */
|
450 |
#define JVMDI_CLASS_STATUS_ERROR ((jint)0x08) |
451 |
|
452 |
/* structure for returning line number information
|
453 |
*/
|
454 |
typedef struct { |
455 |
jlocation start_location; |
456 |
jint line_number; |
457 |
} JVMDI_line_number_entry; |
458 |
|
459 |
|
460 |
/* structure for returning local variable information
|
461 |
*/
|
462 |
typedef struct { |
463 |
jlocation start_location; /* variable valid start_location */
|
464 |
jint length; /* upto start_location+length */
|
465 |
char *name; /* name in UTF8 */ |
466 |
char *signature; /* type signature in UTF8 */ |
467 |
jint slot; /* variable slot, see JVMDI_GetLocal*() */
|
468 |
} JVMDI_local_variable_entry; |
469 |
|
470 |
/* structure for returning exception handler information
|
471 |
*/
|
472 |
typedef struct { |
473 |
jlocation start_location; |
474 |
jlocation end_location; |
475 |
jlocation handler_location; |
476 |
jclass exception; /* if null, all exceptions */
|
477 |
} JVMDI_exception_handler_entry; |
478 |
|
479 |
#define JVMDI_OPERAND_TYPE_REFERENCE ((jint)1) |
480 |
#define JVMDI_OPERAND_TYPE_INT ((jint)2) |
481 |
#define JVMDI_OPERAND_TYPE_FLOAT ((jint)3) |
482 |
#define JVMDI_OPERAND_TYPE_LONG0 ((jint)4) /* least sig. 32 bits */ |
483 |
#define JVMDI_OPERAND_TYPE_LONG1 ((jint)5) /* most sig. 32 bits */ |
484 |
#define JVMDI_OPERAND_TYPE_DOUBLE0 ((jint)6) /* least sig. 32 bits */ |
485 |
#define JVMDI_OPERAND_TYPE_DOUBLE1 ((jint)7) /* most sig. 32 bits */ |
486 |
#define JVMDI_OPERAND_TYPE_RETURN_ADDRESS ((jint)8) |
487 |
|
488 |
typedef struct { |
489 |
jint word; /* 32 bit operand stack quantities */
|
490 |
jint type; /* type encoding of the operand word */
|
491 |
/* one of JVMDI_OPERAND_TYPE_* */
|
492 |
} JVMDI_operand_stack_element; |
493 |
|
494 |
typedef struct { |
495 |
jint instance_field_count; /* number of instance fields referencing obj */
|
496 |
struct JVMDI_instance_field {
|
497 |
jobject instance; /* instance referencing obj */
|
498 |
jfieldID field; /* field holding reference */
|
499 |
} *instance_fields; /* instanceField_count of them */
|
500 |
|
501 |
jint static_field_count; /* number of static fields referencing obj */
|
502 |
struct JVMDI_static_field {
|
503 |
jclass clazz; /* class referencing obj */
|
504 |
jfieldID static_field; /* field holding reference */
|
505 |
} *static_fields; /* static_field_count of them */
|
506 |
|
507 |
jint array_element_count; /* number of array elements referencing obj */
|
508 |
struct JVMDI_array_element {
|
509 |
jobjectArray array; /* array referencing obj */
|
510 |
jint index; /* index holding reference */
|
511 |
} *array_elements; /* array_element_count of them */
|
512 |
|
513 |
jint frame_slot_count; /* number of frame slots referencing obj */
|
514 |
struct JVMDI_frame_slot {
|
515 |
jthread thread; /* thread of the frame */
|
516 |
jframeID frame; /* frame referencing obj */
|
517 |
jint slot; /* slot holding reference */
|
518 |
} *frame_slots; /* frame_slot_count of them */
|
519 |
} JVMDI_object_reference_info; |
520 |
|
521 |
/* structure for defining a class
|
522 |
*/
|
523 |
typedef struct { |
524 |
jclass clazz; /* Class object for this class */
|
525 |
jint class_byte_count; /* number of bytes defining class (below) */
|
526 |
jbyte *class_bytes; /* bytes defining class (in JVM spec */
|
527 |
/* Class File Format) */
|
528 |
} JVMDI_class_definition; |
529 |
|
530 |
/* For backwards compatibility */
|
531 |
#define can_change_schema can_unrestrictedly_redefine_classes
|
532 |
|
533 |
typedef struct { |
534 |
unsigned int can_watch_field_modification : 1; |
535 |
unsigned int can_watch_field_access : 1; |
536 |
unsigned int can_get_bytecodes : 1; |
537 |
unsigned int can_get_synthetic_attribute : 1; |
538 |
unsigned int can_get_owned_monitor_info : 1; |
539 |
unsigned int can_get_current_contended_monitor : 1; |
540 |
unsigned int can_get_monitor_info : 1; |
541 |
unsigned int can_get_heap_info : 1; |
542 |
unsigned int can_get_operand_stack : 1; |
543 |
unsigned int can_set_operand_stack : 1; |
544 |
unsigned int can_pop_frame : 1; |
545 |
unsigned int can_get_class_definition : 1; |
546 |
unsigned int can_redefine_classes : 1; |
547 |
unsigned int can_add_method : 1; |
548 |
unsigned int can_unrestrictedly_redefine_classes : 1; |
549 |
unsigned int can_suspend_resume_thread_lists : 1; |
550 |
} JVMDI_capabilities; |
551 |
|
552 |
typedef struct JVMDI_Interface_1_ { |
553 |
jvmdiError (JNICALL *SetEventHook) |
554 |
(JVMDI_EventHook hook); |
555 |
jvmdiError (JNICALL *SetEventNotificationMode) |
556 |
(jint mode, jint eventType, jthread thread, ...); |
557 |
|
558 |
jvmdiError (JNICALL *GetThreadStatus) |
559 |
(jthread thread, |
560 |
jint *threadStatusPtr, jint *suspendStatusPtr); |
561 |
jvmdiError (JNICALL *GetAllThreads) |
562 |
(jint *threadsCountPtr, jthread **threadsPtr); |
563 |
jvmdiError (JNICALL *SuspendThread) |
564 |
(jthread thread); |
565 |
jvmdiError (JNICALL *ResumeThread) |
566 |
(jthread thread); |
567 |
jvmdiError (JNICALL *StopThread) |
568 |
(jthread thread, jobject exception); |
569 |
jvmdiError (JNICALL *InterruptThread) |
570 |
(jthread thread); |
571 |
jvmdiError (JNICALL *GetThreadInfo) |
572 |
(jthread thread, JVMDI_thread_info *infoPtr); |
573 |
jvmdiError (JNICALL *GetOwnedMonitorInfo) |
574 |
(jthread thread, JVMDI_owned_monitor_info *infoPtr); |
575 |
jvmdiError (JNICALL *GetCurrentContendedMonitor) |
576 |
(jthread thread, jobject *monitor); |
577 |
jvmdiError (JNICALL *RunDebugThread) |
578 |
(jthread thread, JVMDI_StartFunction proc, void *arg,
|
579 |
int priority);
|
580 |
|
581 |
jvmdiError (JNICALL *GetTopThreadGroups) |
582 |
(jint *groupCountPtr, jthreadGroup **groupsPtr); |
583 |
jvmdiError (JNICALL *GetThreadGroupInfo) |
584 |
(jthreadGroup group, JVMDI_thread_group_info *infoPtr); |
585 |
jvmdiError (JNICALL *GetThreadGroupChildren) |
586 |
(jthreadGroup group, |
587 |
jint *threadCountPtr, jthread **threadsPtr, |
588 |
jint *groupCountPtr, jthreadGroup **groupsPtr); |
589 |
|
590 |
jvmdiError (JNICALL *GetFrameCount) |
591 |
(jthread thread, jint *countPtr); |
592 |
jvmdiError (JNICALL *GetCurrentFrame) |
593 |
(jthread thread, jframeID *framePtr); |
594 |
jvmdiError (JNICALL *GetCallerFrame) |
595 |
(jframeID called, jframeID *framePtr); |
596 |
jvmdiError (JNICALL *GetFrameLocation) |
597 |
(jframeID frame, jclass *classPtr, jmethodID *methodPtr, |
598 |
jlocation *locationPtr); |
599 |
jvmdiError (JNICALL *NotifyFramePop) |
600 |
(jframeID frame); |
601 |
jvmdiError (JNICALL *GetLocalObject) |
602 |
(jframeID frame, jint slot, jobject *valuePtr); |
603 |
jvmdiError (JNICALL *GetLocalInt) |
604 |
(jframeID frame, jint slot, jint *valuePtr); |
605 |
jvmdiError (JNICALL *GetLocalLong) |
606 |
(jframeID frame, jint slot, jlong *valuePtr); |
607 |
jvmdiError (JNICALL *GetLocalFloat) |
608 |
(jframeID frame, jint slot, jfloat *valuePtr); |
609 |
jvmdiError (JNICALL *GetLocalDouble) |
610 |
(jframeID frame, jint slot, jdouble *valuePtr); |
611 |
jvmdiError (JNICALL *SetLocalObject) |
612 |
(jframeID frame, jint slot, jobject value); |
613 |
jvmdiError (JNICALL *SetLocalInt) |
614 |
(jframeID frame, jint slot, jint value); |
615 |
jvmdiError (JNICALL *SetLocalLong) |
616 |
(jframeID frame, jint slot, jlong value); |
617 |
jvmdiError (JNICALL *SetLocalFloat) |
618 |
(jframeID frame, jint slot, jfloat value); |
619 |
jvmdiError (JNICALL *SetLocalDouble) |
620 |
(jframeID frame, jint slot, jdouble value); |
621 |
|
622 |
jvmdiError (JNICALL *CreateRawMonitor) |
623 |
(char *name, JVMDI_RawMonitor *monitorPtr);
|
624 |
jvmdiError (JNICALL *DestroyRawMonitor) |
625 |
(JVMDI_RawMonitor monitor); |
626 |
jvmdiError (JNICALL *RawMonitorEnter) |
627 |
(JVMDI_RawMonitor monitor); |
628 |
jvmdiError (JNICALL *RawMonitorExit) |
629 |
(JVMDI_RawMonitor monitor); |
630 |
jvmdiError (JNICALL *RawMonitorWait) |
631 |
(JVMDI_RawMonitor monitor, jlong millis); |
632 |
jvmdiError (JNICALL *RawMonitorNotify) |
633 |
(JVMDI_RawMonitor monitor); |
634 |
jvmdiError (JNICALL *RawMonitorNotifyAll) |
635 |
(JVMDI_RawMonitor monitor); |
636 |
|
637 |
jvmdiError (JNICALL *SetBreakpoint) |
638 |
(jclass clazz, jmethodID method, jlocation location); |
639 |
jvmdiError (JNICALL *ClearBreakpoint) |
640 |
(jclass clazz, jmethodID method, jlocation location); |
641 |
jvmdiError (JNICALL *ClearAllBreakpoints) |
642 |
(); |
643 |
|
644 |
jvmdiError (JNICALL *SetFieldAccessWatch) |
645 |
(jclass clazz, jfieldID field); |
646 |
jvmdiError (JNICALL *ClearFieldAccessWatch) |
647 |
(jclass clazz, jfieldID field); |
648 |
jvmdiError (JNICALL *SetFieldModificationWatch) |
649 |
(jclass clazz, jfieldID field); |
650 |
jvmdiError (JNICALL *ClearFieldModificationWatch) |
651 |
(jclass clazz, jfieldID field); |
652 |
|
653 |
jvmdiError (JNICALL *SetAllocationHooks) |
654 |
(JVMDI_AllocHook ahook, JVMDI_DeallocHook dhook); |
655 |
jvmdiError (JNICALL *Allocate) |
656 |
(jlong size, jbyte** memPtr); |
657 |
jvmdiError (JNICALL *Deallocate) |
658 |
(jbyte* mem); |
659 |
|
660 |
jvmdiError (JNICALL *GetClassSignature) |
661 |
(jclass clazz, char **sigPtr);
|
662 |
jvmdiError (JNICALL *GetClassStatus) |
663 |
(jclass clazz, jint *statusPtr); |
664 |
jvmdiError (JNICALL *GetSourceFileName) |
665 |
(jclass clazz, char **sourceNamePtr);
|
666 |
jvmdiError (JNICALL *GetClassModifiers) |
667 |
(jclass clazz, jint *modifiersPtr); |
668 |
jvmdiError (JNICALL *GetClassMethods) |
669 |
(jclass clazz, jint *methodCountPtr, jmethodID **methodsPtr); |
670 |
jvmdiError (JNICALL *GetClassFields) |
671 |
(jclass clazz, jint *fieldCountPtr, jfieldID **fieldsPtr); |
672 |
jvmdiError (JNICALL *GetImplementedInterfaces) |
673 |
(jclass clazz, jint *interfaceCountPtr, jclass **interfacesPtr); |
674 |
jvmdiError (JNICALL *IsInterface) |
675 |
(jclass clazz, jboolean *isInterfacePtr); |
676 |
jvmdiError (JNICALL *IsArrayClass) |
677 |
(jclass clazz, jboolean *isArrayClassPtr); |
678 |
jvmdiError (JNICALL *GetClassLoader) |
679 |
(jclass clazz, jobject *classloaderPtr); |
680 |
|
681 |
jvmdiError (JNICALL *GetObjectHashCode) |
682 |
(jobject object, jint *hashCodePtr); |
683 |
jvmdiError (JNICALL *GetMonitorInfo) |
684 |
(jobject object, JVMDI_monitor_info *infoPtr); |
685 |
|
686 |
jvmdiError (JNICALL *GetFieldName) |
687 |
(jclass clazz, jfieldID field, char **namePtr, char **signaturePtr); |
688 |
jvmdiError (JNICALL *GetFieldDeclaringClass) |
689 |
(jclass clazz, jfieldID field, jclass *declaringClassPtr); |
690 |
jvmdiError (JNICALL *GetFieldModifiers) |
691 |
(jclass clazz, jfieldID field, jint *modifiersPtr); |
692 |
jvmdiError (JNICALL *IsFieldSynthetic) |
693 |
(jclass clazz, jfieldID field, jboolean *isSyntheticPtr); |
694 |
|
695 |
jvmdiError (JNICALL *GetMethodName) |
696 |
(jclass clazz, jmethodID method, |
697 |
char **namePtr, char **signaturePtr); |
698 |
jvmdiError (JNICALL *GetMethodDeclaringClass) |
699 |
(jclass clazz, jmethodID method, jclass *declaringClassPtr); |
700 |
jvmdiError (JNICALL *GetMethodModifiers) |
701 |
(jclass clazz, jmethodID method, jint *modifiersPtr); |
702 |
jvmdiError (JNICALL *GetMaxStack) |
703 |
(jclass clazz, jmethodID method, jint *maxPtr); |
704 |
jvmdiError (JNICALL *GetMaxLocals) |
705 |
(jclass clazz, jmethodID method, jint *maxPtr); |
706 |
jvmdiError (JNICALL *GetArgumentsSize) |
707 |
(jclass clazz, jmethodID method, jint *sizePtr); |
708 |
jvmdiError (JNICALL *GetLineNumberTable) |
709 |
(jclass clazz, jmethodID method, |
710 |
jint *entryCountPtr, JVMDI_line_number_entry **tablePtr); |
711 |
jvmdiError (JNICALL *GetMethodLocation) |
712 |
(jclass clazz, jmethodID method, |
713 |
jlocation *startLocationPtr, jlocation *endLocationPtr); |
714 |
jvmdiError (JNICALL *GetLocalVariableTable) |
715 |
(jclass clazz, jmethodID method, |
716 |
jint *entryCountPtr, JVMDI_local_variable_entry **tablePtr); |
717 |
jvmdiError (JNICALL *GetExceptionHandlerTable) |
718 |
(jclass clazz, jmethodID method, |
719 |
jint *entryCountPtr, JVMDI_exception_handler_entry **tablePtr); |
720 |
jvmdiError (JNICALL *GetThrownExceptions) |
721 |
(jclass clazz, jmethodID method, |
722 |
jint *exceptionCountPtr, jclass **exceptionsPtr); |
723 |
jvmdiError (JNICALL *GetBytecodes) |
724 |
(jclass clazz, jmethodID method, |
725 |
jint *bytecodeCountPtr, jbyte **bytecodesPtr); |
726 |
jvmdiError (JNICALL *IsMethodNative) |
727 |
(jclass clazz, jmethodID method, jboolean *isNativePtr); |
728 |
jvmdiError (JNICALL *IsMethodSynthetic) |
729 |
(jclass clazz, jmethodID method, jboolean *isSyntheticPtr); |
730 |
|
731 |
jvmdiError (JNICALL *GetLoadedClasses) |
732 |
(jint *classCountPtr, jclass **classesPtr); |
733 |
jvmdiError (JNICALL *GetClassLoaderClasses) |
734 |
(jobject initiatingLoader, jint *classesCountPtr, |
735 |
jclass **classesPtr); |
736 |
|
737 |
jvmdiError (JNICALL *PopFrame) |
738 |
(jthread thread); |
739 |
jvmdiError (JNICALL *SetFrameLocation) |
740 |
(jframeID frame, jlocation location); |
741 |
jvmdiError (JNICALL *GetOperandStack) |
742 |
(jframeID frame, jint *operandStackSizePtr, |
743 |
JVMDI_operand_stack_element **operandStackPtr); |
744 |
jvmdiError (JNICALL *SetOperandStack) |
745 |
(jframeID frame, jint operandStackSize, |
746 |
JVMDI_operand_stack_element *operandStack); |
747 |
jvmdiError (JNICALL *AllInstances) |
748 |
(jclass clazz, jint *instanceCountPtr, jobject **instancesPtr); |
749 |
jvmdiError (JNICALL *References) |
750 |
(jobject obj, JVMDI_object_reference_info *refs); |
751 |
jvmdiError (JNICALL *GetClassDefinition) |
752 |
(jclass clazz, JVMDI_class_definition *classDefPtr); |
753 |
jvmdiError (JNICALL *RedefineClasses) |
754 |
(jint classCount, JVMDI_class_definition *classDefs); |
755 |
|
756 |
jvmdiError (JNICALL *GetVersionNumber) |
757 |
(jint *versionPtr); |
758 |
jvmdiError (JNICALL *GetCapabilities) |
759 |
(JVMDI_capabilities *capabilitiesPtr); |
760 |
|
761 |
jvmdiError (JNICALL *GetSourceDebugExtension) |
762 |
(jclass clazz, char **sourceDebugExtension);
|
763 |
jvmdiError (JNICALL *IsMethodObsolete) |
764 |
(jclass clazz, jmethodID method, jboolean *isObsoletePtr); |
765 |
|
766 |
jvmdiError (JNICALL *SuspendThreadList) |
767 |
(jint reqCount, jthread *reqList, jvmdiError *results); |
768 |
jvmdiError (JNICALL *ResumeThreadList) |
769 |
(jint reqCount, jthread *reqList, jvmdiError *results); |
770 |
} JVMDI_Interface_1; |
771 |
|
772 |
#ifndef NO_JVMDI_MACROS
|
773 |
|
774 |
#define JVMDI_ERROR_DUPLICATE_BREAKPOINT JVMDI_ERROR_DUPLICATE
|
775 |
#define JVMDI_ERROR_NO_SUCH_BREAKPOINT JVMDI_ERROR_NOT_FOUND
|
776 |
#define JVMDI_ERROR_DUPLICATE_FRAME_POP JVMDI_ERROR_DUPLICATE
|
777 |
|
778 |
|
779 |
static JVMDI_Interface_1 *jvmdi_interface = NULL; |
780 |
static JavaVM *j_vm;
|
781 |
|
782 |
#ifdef __cplusplus
|
783 |
#define SetJVMDIfromJNIEnv(a_env) ( (jvmdi_interface == NULL)? \ |
784 |
((a_env)->GetJavaVM(&j_vm), \ |
785 |
(j_vm)->GetEnv((void **)&jvmdi_interface, \
|
786 |
JVMDI_VERSION_1)):0)
|
787 |
#else
|
788 |
#define SetJVMDIfromJNIEnv(a_env) ( (jvmdi_interface == NULL)? \ |
789 |
((*a_env)->GetJavaVM(a_env, &j_vm), \ |
790 |
(*j_vm)->GetEnv(j_vm, (void **)&jvmdi_interface, \
|
791 |
JVMDI_VERSION_1)):0)
|
792 |
#endif
|
793 |
|
794 |
#define JVMDI_SetEventHook(a_env, a1) ( \
|
795 |
SetJVMDIfromJNIEnv(a_env), \ |
796 |
jvmdi_interface->SetEventHook(a1) ) |
797 |
#define JVMDI_GetThreadStatus(a_env, a1, a2, a3) ( \
|
798 |
SetJVMDIfromJNIEnv(a_env), \ |
799 |
jvmdi_interface->GetThreadStatus(a1, a2, a3) ) |
800 |
#define JVMDI_GetAllThreads(a_env, a1, a2) ( \
|
801 |
SetJVMDIfromJNIEnv(a_env), \ |
802 |
jvmdi_interface->GetAllThreads(a1, a2) ) |
803 |
#define JVMDI_SuspendThread(a_env, a1) ( \
|
804 |
SetJVMDIfromJNIEnv(a_env), \ |
805 |
jvmdi_interface->SuspendThread(a1) ) |
806 |
#define JVMDI_ResumeThread(a_env, a1) ( \
|
807 |
SetJVMDIfromJNIEnv(a_env), \ |
808 |
jvmdi_interface->ResumeThread(a1) ) |
809 |
#define JVMDI_StopThread(a_env, a1, a2) ( \
|
810 |
SetJVMDIfromJNIEnv(a_env), \ |
811 |
jvmdi_interface->StopThread(a1, a2) ) |
812 |
#define JVMDI_InterruptThread(a_env, a1) ( \
|
813 |
SetJVMDIfromJNIEnv(a_env), \ |
814 |
jvmdi_interface->InterruptThread(a1) ) |
815 |
#define JVMDI_SetSingleStep(a_env, a1, a2) ( \
|
816 |
SetJVMDIfromJNIEnv(a_env), \ |
817 |
jvmdi_interface->SetEventNotificationMode( \ |
818 |
(a2) ? JVMDI_ENABLE : JVMDI_DISABLE, \ |
819 |
JVMDI_EVENT_SINGLE_STEP, a1) ) |
820 |
#define JVMDI_GetThreadInfo(a_env, a1, a2) ( \
|
821 |
SetJVMDIfromJNIEnv(a_env), \ |
822 |
jvmdi_interface->GetThreadInfo(a1, a2) ) |
823 |
#define JVMDI_RunDebugThread(a_env, a1, a2, a3, a4) ( \
|
824 |
SetJVMDIfromJNIEnv(a_env), \ |
825 |
jvmdi_interface->RunDebugThread(a1, a2, a3, a4) ) |
826 |
#define JVMDI_GetTopThreadGroups(a_env, a1, a2) ( \
|
827 |
SetJVMDIfromJNIEnv(a_env), \ |
828 |
jvmdi_interface->GetTopThreadGroups(a1, a2) ) |
829 |
#define JVMDI_GetThreadGroupInfo(a_env, a1, a2) ( \
|
830 |
SetJVMDIfromJNIEnv(a_env), \ |
831 |
jvmdi_interface->GetThreadGroupInfo(a1, a2) ) |
832 |
#define JVMDI_GetThreadGroupChildren(a_env, a1, a2, a3, a4, a5) ( \
|
833 |
SetJVMDIfromJNIEnv(a_env), \ |
834 |
jvmdi_interface->GetThreadGroupChildren(a1, a2, a3, a4, a5) ) |
835 |
#define JVMDI_GetCurrentFrame(a_env, a1, a2) ( \
|
836 |
SetJVMDIfromJNIEnv(a_env), \ |
837 |
jvmdi_interface->GetCurrentFrame(a1, a2) ) |
838 |
#define JVMDI_GetCallerFrame(a_env, a1, a2) ( \
|
839 |
SetJVMDIfromJNIEnv(a_env), \ |
840 |
jvmdi_interface->GetCallerFrame(a1, a2) ) |
841 |
#define JVMDI_GetFrameLocation(a_env, a1, a2, a3, a4) ( \
|
842 |
SetJVMDIfromJNIEnv(a_env), \ |
843 |
jvmdi_interface->GetFrameLocation(a1, a2, a3, a4) ) |
844 |
#define JVMDI_NotifyFramePop(a_env, a1) ( \
|
845 |
SetJVMDIfromJNIEnv(a_env), \ |
846 |
jvmdi_interface->NotifyFramePop(a1) ) |
847 |
#define JVMDI_GetLocalObject(a_env, a1, a2, a3) ( \
|
848 |
SetJVMDIfromJNIEnv(a_env), \ |
849 |
jvmdi_interface->GetLocalObject(a1, a2, a3) ) |
850 |
#define JVMDI_GetLocalInt(a_env, a1, a2, a3) ( \
|
851 |
SetJVMDIfromJNIEnv(a_env), \ |
852 |
jvmdi_interface->GetLocalInt(a1, a2, a3) ) |
853 |
#define JVMDI_GetLocalLong(a_env, a1, a2, a3) ( \
|
854 |
SetJVMDIfromJNIEnv(a_env), \ |
855 |
jvmdi_interface->GetLocalLong(a1, a2, a3) ) |
856 |
#define JVMDI_GetLocalFloat(a_env, a1, a2, a3) ( \
|
857 |
SetJVMDIfromJNIEnv(a_env), \ |
858 |
jvmdi_interface->GetLocalFloat(a1, a2, a3) ) |
859 |
#define JVMDI_GetLocalDouble(a_env, a1, a2, a3) ( \
|
860 |
SetJVMDIfromJNIEnv(a_env), \ |
861 |
jvmdi_interface->GetLocalDouble(a1, a2, a3) ) |
862 |
#define JVMDI_SetLocalObject(a_env, a1, a2, a3) ( \
|
863 |
SetJVMDIfromJNIEnv(a_env), \ |
864 |
jvmdi_interface->SetLocalObject(a1, a2, a3) ) |
865 |
#define JVMDI_SetLocalInt(a_env, a1, a2, a3) ( \
|
866 |
SetJVMDIfromJNIEnv(a_env), \ |
867 |
jvmdi_interface->SetLocalInt(a1, a2, a3) ) |
868 |
#define JVMDI_SetLocalLong(a_env, a1, a2, a3) ( \
|
869 |
SetJVMDIfromJNIEnv(a_env), \ |
870 |
jvmdi_interface->SetLocalLong(a1, a2, a3) ) |
871 |
#define JVMDI_SetLocalFloat(a_env, a1, a2, a3) ( \
|
872 |
SetJVMDIfromJNIEnv(a_env), \ |
873 |
jvmdi_interface->SetLocalFloat(a1, a2, a3) ) |
874 |
#define JVMDI_SetLocalDouble(a_env, a1, a2, a3) ( \
|
875 |
SetJVMDIfromJNIEnv(a_env), \ |
876 |
jvmdi_interface->SetLocalDouble(a1, a2, a3) ) |
877 |
#define JVMDI_CreateRawMonitor(a_env, a1, a2) ( \
|
878 |
SetJVMDIfromJNIEnv(a_env), \ |
879 |
jvmdi_interface->CreateRawMonitor(a1, a2) ) |
880 |
#define JVMDI_DestroyRawMonitor(a_env, a1) ( \
|
881 |
SetJVMDIfromJNIEnv(a_env), \ |
882 |
jvmdi_interface->DestroyRawMonitor(a1) ) |
883 |
#define JVMDI_RawMonitorEnter(a_env, a1) ( \
|
884 |
SetJVMDIfromJNIEnv(a_env), \ |
885 |
jvmdi_interface->RawMonitorEnter(a1) ) |
886 |
#define JVMDI_RawMonitorExit(a_env, a1) ( \
|
887 |
SetJVMDIfromJNIEnv(a_env), \ |
888 |
jvmdi_interface->RawMonitorExit(a1) ) |
889 |
#define JVMDI_RawMonitorWait(a_env, a1, a2) ( \
|
890 |
SetJVMDIfromJNIEnv(a_env), \ |
891 |
jvmdi_interface->RawMonitorWait(a1, a2) ) |
892 |
#define JVMDI_RawMonitorNotify(a_env, a1) ( \
|
893 |
SetJVMDIfromJNIEnv(a_env), \ |
894 |
jvmdi_interface->RawMonitorNotify(a1) ) |
895 |
#define JVMDI_RawMonitorNotifyAll(a_env, a1) ( \
|
896 |
SetJVMDIfromJNIEnv(a_env), \ |
897 |
jvmdi_interface->RawMonitorNotifyAll(a1) ) |
898 |
#define JVMDI_SetBreakpoint(a_env, a1, a2, a3) ( \
|
899 |
SetJVMDIfromJNIEnv(a_env), \ |
900 |
jvmdi_interface->SetBreakpoint(a1, a2, a3) ) |
901 |
#define JVMDI_ClearBreakpoint(a_env, a1, a2, a3) ( \
|
902 |
SetJVMDIfromJNIEnv(a_env), \ |
903 |
jvmdi_interface->ClearBreakpoint(a1, a2, a3) ) |
904 |
#define JVMDI_ClearAllBreakpoints(a_env) ( \
|
905 |
SetJVMDIfromJNIEnv(a_env), \ |
906 |
jvmdi_interface->ClearAllBreakpoints() ) |
907 |
#define JVMDI_SetAllocationHooks(a_env, a1, a2) ( \
|
908 |
SetJVMDIfromJNIEnv(a_env), \ |
909 |
jvmdi_interface->SetAllocationHooks(a1, a2) ) |
910 |
#define JVMDI_Allocate(a_env, a1, a2) ( \
|
911 |
SetJVMDIfromJNIEnv(a_env), \ |
912 |
jvmdi_interface->Allocate(a1, a2) ) |
913 |
#define JVMDI_Deallocate(a_env, a1) ( \
|
914 |
SetJVMDIfromJNIEnv(a_env), \ |
915 |
jvmdi_interface->Deallocate(a1) ) |
916 |
#define JVMDI_GetClassSignature(a_env, a1, a2) ( \
|
917 |
SetJVMDIfromJNIEnv(a_env), \ |
918 |
jvmdi_interface->GetClassSignature(a1, a2) ) |
919 |
#define JVMDI_GetClassStatus(a_env, a1, a2) ( \
|
920 |
SetJVMDIfromJNIEnv(a_env), \ |
921 |
jvmdi_interface->GetClassStatus(a1, a2) ) |
922 |
#define JVMDI_GetSourceFileName(a_env, a1, a2) ( \
|
923 |
SetJVMDIfromJNIEnv(a_env), \ |
924 |
jvmdi_interface->GetSourceFileName(a1, a2) ) |
925 |
#define JVMDI_GetClassModifiers(a_env, a1, a2) ( \
|
926 |
SetJVMDIfromJNIEnv(a_env), \ |
927 |
jvmdi_interface->GetClassModifiers(a1, a2) ) |
928 |
#define JVMDI_GetClassMethods(a_env, a1, a2, a3) ( \
|
929 |
SetJVMDIfromJNIEnv(a_env), \ |
930 |
jvmdi_interface->GetClassMethods(a1, a2, a3) ) |
931 |
#define JVMDI_GetClassFields(a_env, a1, a2, a3) ( \
|
932 |
SetJVMDIfromJNIEnv(a_env), \ |
933 |
jvmdi_interface->GetClassFields(a1, a2, a3) ) |
934 |
#define JVMDI_GetImplementedInterfaces(a_env, a1, a2, a3) ( \
|
935 |
SetJVMDIfromJNIEnv(a_env), \ |
936 |
jvmdi_interface->GetImplementedInterfaces(a1, a2, a3) ) |
937 |
#define JVMDI_IsInterface(a_env, a1, a2) ( \
|
938 |
SetJVMDIfromJNIEnv(a_env), \ |
939 |
jvmdi_interface->IsInterface(a1, a2) ) |
940 |
#define JVMDI_IsArrayClass(a_env, a1, a2) ( \
|
941 |
SetJVMDIfromJNIEnv(a_env), \ |
942 |
jvmdi_interface->IsArrayClass(a1, a2) ) |
943 |
#define JVMDI_ClassLoader(a_env, a1, a2) ( \
|
944 |
SetJVMDIfromJNIEnv(a_env), \ |
945 |
jvmdi_interface->GetClassLoader(a1, a2) ) |
946 |
#define JVMDI_GetFieldName(a_env, a1, a2, a3, a4) ( \
|
947 |
SetJVMDIfromJNIEnv(a_env), \ |
948 |
jvmdi_interface->GetFieldName(a1, a2, a3, a4) ) |
949 |
#define JVMDI_GetFieldDeclaringClass(a_env, a1, a2, a3) ( \
|
950 |
SetJVMDIfromJNIEnv(a_env), \ |
951 |
jvmdi_interface->GetFieldDeclaringClass(a1, a2, a3) ) |
952 |
#define JVMDI_GetFieldModifiers(a_env, a1, a2, a3) ( \
|
953 |
SetJVMDIfromJNIEnv(a_env), \ |
954 |
jvmdi_interface->GetFieldModifiers(a1, a2, a3) ) |
955 |
#define JVMDI_GetMethodName(a_env, a1, a2, a3, a4) ( \
|
956 |
SetJVMDIfromJNIEnv(a_env), \ |
957 |
jvmdi_interface->GetMethodName(a1, a2, a3, a4) ) |
958 |
#define JVMDI_GetMethodDeclaringClass(a_env, a1, a2, a3) ( \
|
959 |
SetJVMDIfromJNIEnv(a_env), \ |
960 |
jvmdi_interface->GetMethodDeclaringClass(a1, a2, a3) ) |
961 |
#define JVMDI_GetMethodModifiers(a_env, a1, a2, a3) ( \
|
962 |
SetJVMDIfromJNIEnv(a_env), \ |
963 |
jvmdi_interface->GetMethodModifiers(a1, a2, a3) ) |
964 |
#define JVMDI_GetMaxStack(a_env, a1, a2, a3) ( \
|
965 |
SetJVMDIfromJNIEnv(a_env), \ |
966 |
jvmdi_interface->GetMaxStack(a1, a2, a3) ) |
967 |
#define JVMDI_GetMaxLocals(a_env, a1, a2, a3) ( \
|
968 |
SetJVMDIfromJNIEnv(a_env), \ |
969 |
jvmdi_interface->GetMaxLocals(a1, a2, a3) ) |
970 |
#define JVMDI_GetArgumentsSize(a_env, a1, a2, a3) ( \
|
971 |
SetJVMDIfromJNIEnv(a_env), \ |
972 |
jvmdi_interface->GetArgumentsSize(a1, a2, a3) ) |
973 |
#define JVMDI_GetLineNumberTable(a_env, a1, a2, a3, a4) ( \
|
974 |
SetJVMDIfromJNIEnv(a_env), \ |
975 |
jvmdi_interface->GetLineNumberTable(a1, a2, a3, a4) ) |
976 |
#define JVMDI_GetMethodLocation(a_env, a1, a2, a3, a4) ( \
|
977 |
SetJVMDIfromJNIEnv(a_env), \ |
978 |
jvmdi_interface->GetMethodLocation(a1, a2, a3, a4) ) |
979 |
#define JVMDI_GetLocalVariableTable(a_env, a1, a2, a3, a4) ( \
|
980 |
SetJVMDIfromJNIEnv(a_env), \ |
981 |
jvmdi_interface->GetLocalVariableTable(a1, a2, a3, a4) ) |
982 |
#define JVMDI_GetExceptionHandlerTable(a_env, a1, a2, a3, a4) ( \
|
983 |
SetJVMDIfromJNIEnv(a_env), \ |
984 |
jvmdi_interface->GetExceptionHandlerTable(a1, a2, a3, a4) ) |
985 |
#define JVMDI_GetThrownExceptions(a_env, a1, a2, a3, a4) ( \
|
986 |
SetJVMDIfromJNIEnv(a_env), \ |
987 |
jvmdi_interface->GetThrownExceptions(a1, a2, a3, a4) ) |
988 |
#define JVMDI_GetBytecodes(a_env, a1, a2, a3, a4) ( \
|
989 |
SetJVMDIfromJNIEnv(a_env), \ |
990 |
jvmdi_interface->GetBytecodes(a1, a2, a3, a4) ) |
991 |
#define JVMDI_IsMethodNative(a_env, a1, a2, a3) ( \
|
992 |
SetJVMDIfromJNIEnv(a_env), \ |
993 |
jvmdi_interface->IsMethodNative(a1, a2, a3) ) |
994 |
#define JVMDI_GetLoadedClasses(a_env, a1, a2) ( \
|
995 |
SetJVMDIfromJNIEnv(a_env), \ |
996 |
jvmdi_interface->GetLoadedClasses(a1, a2) ) |
997 |
#define JVMDI_GetClassLoaderClasses(a_env, a1, a2, a3) ( \
|
998 |
SetJVMDIfromJNIEnv(a_env), \ |
999 |
jvmdi_interface->GetClassLoaderClasses(a1, a2, a3) ) |
1000 |
#define JVMDI_GetVersionNumber(a_env, a1) ( \
|
1001 |
SetJVMDIfromJNIEnv(a_env), \ |
1002 |
jvmdi_interface->GetVersionNumber(a1) ) |
1003 |
|
1004 |
#endif /* !NO_JVMDI_MACROS */ |
1005 |
|
1006 |
#ifdef __cplusplus
|
1007 |
} /* extern "C" */
|
1008 |
#endif /* __cplusplus */ |
1009 |
|
1010 |
#endif /* !_JAVASOFT_JVMDI_H_ */ |
1011 |
|
1012 |
|