d1b79745500a61dfd615ac177f626b41b9e2eaf8
[cacao.git] / src / native / vm / VMVirtualMachine.c
1 /* src/native/vm/VMVirtualMachine.c - jdwp->jvmti interface
2
3 Copyright (C) 1996-2005 R. Grafl, A. Krall, C. Kruegel, C. Oates,
4 R. Obermaisser, M. Platter, M. Probst, S. Ring, E. Steiner,
5 C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich, J. Wenninger,
6 Institut f. Computersprachen - TU Wien
7
8 This file is part of CACAO.
9
10 This program is free software; you can redistribute it and/or
11 modify it under the terms of the GNU General Public License as
12 published by the Free Software Foundation; either version 2, or (at
13 your option) any later version.
14
15 This program is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
23 02111-1307, USA.
24
25 Contact: cacao@complang.tuwien.ac.at
26
27 Authors: Martin Platter
28
29 Changes: 
30
31
32 $Id: VMVirtualMachine.c 3593 2005-11-06 16:16:07Z motse $
33
34 */
35
36 #include "toolbox/logging.h"
37 #include "native/jni.h"
38 #include "native/include/java_lang_Thread.h"
39 #include "native/include/java_nio_ByteBuffer.h"
40 #include "native/include/java_lang_Class.h"
41 #include "native/include/java_lang_ClassLoader.h"
42 #include "native/include/java_lang_reflect_Method.h"
43 #include "native/include/gnu_classpath_jdwp_event_EventRequest.h"
44 #include "native/include/gnu_classpath_jdwp_VMVirtualMachine.h"
45 #include "native/jvmti/jvmti.h"
46
47
48 /*
49  * Class:     gnu_classpath_jdwp_VMVirtualMachine
50  * Method:    suspendThread
51  * Signature: (Ljava/lang/Thread;)V
52  */
53 JNIEXPORT void JNICALL Java_gnu_classpath_jdwp_VMVirtualMachine_suspendThread(JNIEnv *env, jclass clazz, struct java_lang_Thread* par1)
54 {
55     remotedbgjvmtienv->SuspendThread(remotedbgjvmtienv, (jthread) par1);
56 }
57
58 /*
59  * Class:     gnu_classpath_jdwp_VMVirtualMachine
60  * Method:    resumeThread
61  * Signature: (Ljava/lang/Thread;)V
62  */
63 JNIEXPORT void JNICALL Java_gnu_classpath_jdwp_VMVirtualMachine_resumeThread(JNIEnv *env, jclass clazz, struct java_lang_Thread* par1)
64 {
65     remotedbgjvmtienv->ResumeThread(remotedbgjvmtienv, (jthread) par1);
66 }
67
68
69 /*
70  * Class:     gnu_classpath_jdwp_VMVirtualMachine
71  * Method:    getSuspendCount
72  * Signature: (Ljava/lang/Thread;)I
73  */
74 JNIEXPORT s4 JNICALL Java_gnu_classpath_jdwp_VMVirtualMachine_getSuspendCount(JNIEnv *env, jclass clazz, struct java_lang_Thread* par1) {
75     log_text ("JVMTI-Call: IMPLEMENT ME!!!");
76         return 0;
77 }
78
79 /*
80  * Class:     gnu_classpath_jdwp_VMVirtualMachine
81  * Method:    getAllLoadedClassesCount
82  * Signature: ()I
83  */
84 JNIEXPORT s4 JNICALL Java_gnu_classpath_jdwp_VMVirtualMachine_getAllLoadedClassesCount(JNIEnv *env, jclass clazz) {
85     jint count;
86     jclass* classes;
87
88     remotedbgjvmtienv->GetLoadedClasses(remotedbgjvmtienv, &count, &classes);
89     return count;
90 }
91
92 /* Class:     gnu/classpath/jdwp/VMVirtualMachine
93  * Method:    getClassStatus
94  * Signature: (Ljava/lang/Class;)I
95  */
96 JNIEXPORT s4 JNICALL Java_gnu_classpath_jdwp_VMVirtualMachine_getClassStatus(JNIEnv *env, jclass clazz, struct java_lang_Class* par1) {
97     log_text ("JVMTI-Call: IMPLEMENT ME!!!");
98         return 0;
99 }
100
101
102 /*
103  * Class:     gnu/classpath/jdwp/VMVirtualMachine
104  * Method:    getFrames
105  * Signature: (Ljava/lang/Thread;II)Ljava/util/ArrayList;
106  */
107 JNIEXPORT struct java_util_ArrayList* JNICALL Java_gnu_classpath_jdwp_VMVirtualMachine_getFrames(JNIEnv *env, jclass clazz, struct java_lang_Thread* par1, s4 par2, s4 par3) {
108     log_text ("JVMTI-Call: IMPLEMENT ME!!!");
109         return 0;
110 }
111
112
113 /*
114  * Class:     gnu/classpath/jdwp/VMVirtualMachine
115  * Method:    getFrame
116  * Signature: (Ljava/lang/Thread;Ljava/nio/ByteBuffer;)Lgnu/classpath/jdwp/VMFrame;
117  */
118 JNIEXPORT struct gnu_classpath_jdwp_VMFrame* JNICALL Java_gnu_classpath_jdwp_VMVirtualMachine_getFrame(JNIEnv *env, jclass clazz, struct java_lang_Thread* par1, struct java_nio_ByteBuffer* par2) {
119     log_text ("JVMTI-Call: IMPLEMENT ME!!!");
120         return 0;
121 }
122
123
124 /*
125  * Class:     gnu/classpath/jdwp/VMVirtualMachine
126  * Method:    getFrameCount
127  * Signature: (Ljava/lang/Thread;)I
128  */
129 JNIEXPORT s4 JNICALL Java_gnu_classpath_jdwp_VMVirtualMachine_getFrameCount(JNIEnv *env, jclass clazz, struct java_lang_Thread* par1) {
130     log_text ("JVMTI-Call: IMPLEMENT ME!!!");
131         return 0;
132 }
133
134
135 /*
136  * Class:     gnu/classpath/jdwp/VMVirtualMachine
137  * Method:    getThreadStatus
138  * Signature: (Ljava/lang/Thread;)I
139  */
140 JNIEXPORT s4 JNICALL Java_gnu_classpath_jdwp_VMVirtualMachine_getThreadStatus(JNIEnv *env, jclass clazz, struct java_lang_Thread* par1) {
141     log_text ("JVMTI-Call: IMPLEMENT ME!!!");
142         return 0;
143 }
144
145
146 /*
147  * Class:     gnu/classpath/jdwp/VMVirtualMachine
148  * Method:    getLoadRequests
149  * Signature: (Ljava/lang/ClassLoader;)Ljava/util/ArrayList;
150  */
151 JNIEXPORT struct java_util_ArrayList* JNICALL Java_gnu_classpath_jdwp_VMVirtualMachine_getLoadRequests(JNIEnv *env, jclass clazz, struct java_lang_ClassLoader* par1) {
152     log_text ("JVMTI-Call: IMPLEMENT ME!!!");
153         return 0;
154 }
155
156
157 /*
158  * Class:     gnu/classpath/jdwp/VMVirtualMachine
159  * Method:    executeMethod
160  * Signature: (Ljava/lang/Object;Ljava/lang/Thread;Ljava/lang/Class;Ljava/lang/reflect/Method;[Ljava/lang/Object;Z)Lgnu/classpath/jdwp/util/MethodResult;
161  */
162 JNIEXPORT struct gnu_classpath_jdwp_util_MethodResult* JNICALL Java_gnu_classpath_jdwp_VMVirtualMachine_executeMethod(JNIEnv *env, jclass clazz, struct java_lang_Object* par1, struct java_lang_Thread* par2, struct java_lang_Class* par3, struct java_lang_reflect_Method* par4, java_objectarray* par5, s4 par6) {
163     log_text ("JVMTI-Call: IMPLEMENT ME!!!");
164         return 0;
165 }
166
167
168 /*
169  * Class:     gnu/classpath/jdwp/VMVirtualMachine
170  * Method:    getVarTable
171  * Signature: (Ljava/lang/Class;Ljava/lang/reflect/Method;)Lgnu/classpath/jdwp/util/VariableTable;
172  */
173 JNIEXPORT struct gnu_classpath_jdwp_util_VariableTable* JNICALL Java_gnu_classpath_jdwp_VMVirtualMachine_getVarTable(JNIEnv *env, jclass clazz, struct java_lang_Class* par1, struct java_lang_reflect_Method* par2) {
174     log_text ("JVMTI-Call: IMPLEMENT ME!!!");
175         return 0;
176 }
177
178
179 /*
180  * Class:     gnu/classpath/jdwp/VMVirtualMachine
181  * Method:    getLineTable
182  * Signature: (Ljava/lang/Class;Ljava/lang/reflect/Method;)Lgnu/classpath/jdwp/util/LineTable;
183  */
184 JNIEXPORT struct gnu_classpath_jdwp_util_LineTable* JNICALL Java_gnu_classpath_jdwp_VMVirtualMachine_getLineTable(JNIEnv *env, jclass clazz, struct java_lang_Class* par1, struct java_lang_reflect_Method* par2) {
185     log_text ("JVMTI-Call: IMPLEMENT ME!!!");
186         return 0;
187 }
188
189
190 /*
191  * Class:     gnu/classpath/jdwp/VMVirtualMachine
192  * Method:    getSourceFile
193  * Signature: (Ljava/lang/Class;)Ljava/lang/String;
194  */
195 JNIEXPORT struct java_lang_String* JNICALL Java_gnu_classpath_jdwp_VMVirtualMachine_getSourceFile(JNIEnv *env, jclass clazz, struct java_lang_Class* par1) {
196     log_text ("JVMTI-Call: IMPLEMENT ME!!!");
197         return 0;
198 }
199
200
201 /*
202  * Class:     gnu/classpath/jdwp/VMVirtualMachine
203  * Method:    registerEvent
204  * Signature: (Lgnu/classpath/jdwp/event/EventRequest;)V
205  */
206 JNIEXPORT void JNICALL Java_gnu_classpath_jdwp_VMVirtualMachine_registerEvent(JNIEnv *env, jclass clazz, struct gnu_classpath_jdwp_event_EventRequest* par1) {
207     log_text ("JVMTI-Call: IMPLEMENT ME!!!");
208 }
209
210
211 /*
212  * Class:     gnu/classpath/jdwp/VMVirtualMachine
213  * Method:    unregisterEvent
214  * Signature: (Lgnu/classpath/jdwp/event/EventRequest;)V
215  */
216 JNIEXPORT void JNICALL Java_gnu_classpath_jdwp_VMVirtualMachine_unregisterEvent(JNIEnv *env, jclass clazz, struct gnu_classpath_jdwp_event_EventRequest* par1) {
217     log_text ("JVMTI-Call: IMPLEMENT ME!!!");
218 }
219
220
221 /*
222  * Class:     gnu/classpath/jdwp/VMVirtualMachine
223  * Method:    clearEvents
224  * Signature: (B)V
225  */
226 JNIEXPORT void JNICALL Java_gnu_classpath_jdwp_VMVirtualMachine_clearEvents(JNIEnv *env, jclass clazz, s4 par1) {
227     log_text ("JVMTI-Call: IMPLEMENT ME!!!");
228 }
229
230
231 /*
232  * These are local overrides for various environment variables in Emacs.
233  * Please do not remove this and leave it at the end of the file, where
234  * Emacs will automagically detect them.
235  * ---------------------------------------------------------------------
236  * Local variables:
237  * mode: c
238  * indent-tabs-mode: t
239  * c-basic-offset: 4
240  * tab-width: 4
241  * End:
242  */