1 /* src/native/vm/VMjdwp.c - jvmti->jdwp interface
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
8 This file is part of CACAO.
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.
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.
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
25 Contact: cacao@complang.tuwien.ac.at
27 Author: Martin Platter
32 $Id: VMjdwp.c 3588 2005-11-06 14:01:10Z motse $
37 #include "vm/loader.h"
38 #include "vm/exceptions.h"
39 #include "vm/jit/asmpart.h"
41 static jmethodID notifymid = NULL;
42 static jclass Jdwpclass = NULL;
44 void notify (jobject event){
46 if (notifymid == NULL) {
48 load_class_from_sysloader(utf_new_char("gnu.classpath.jdwp.Jdwp"));
50 throw_main_exception_exit();
52 notifymid = class_resolveclassmethod(
54 utf_new_char("notify"),
55 utf_new_char("(Lgnu.classpath.jdwp.event.Event;)V"),
56 class_java_lang_Object,
60 throw_main_exception_exit();
63 asm_calljavafunction(m, Jdwpclass, event, NULL, NULL);
67 static void SingleStep (jvmtiEnv *jvmti_env,
72 log_text ("JVMTI-Event: IMPLEMENT ME!!!");
75 static void Breakpoint (jvmtiEnv *jvmti_env,
80 log_text ("JVMTI-Event: IMPLEMENT ME!!!");
83 static void FieldAccess (jvmtiEnv *jvmti_env,
92 log_text ("JVMTI-Event: IMPLEMENT ME!!!");
95 static void FieldModification (jvmtiEnv *jvmti_env,
105 log_text ("JVMTI-Event: IMPLEMENT ME!!!");
108 static void FramePop (jvmtiEnv *jvmti_env,
112 jboolean was_popped_by_exception){
113 log_text ("JVMTI-Event: IMPLEMENT ME!!!");
116 static void MethodEntry (jvmtiEnv *jvmti_env,
120 log_text ("JVMTI-Event: IMPLEMENT ME!!!");
123 static void MethodExit (jvmtiEnv *jvmti_env,
127 jboolean was_popped_by_exception,
128 jvalue return_value){
129 log_text ("JVMTI-Event: IMPLEMENT ME!!!");
132 static void NativeMethodBind (jvmtiEnv *jvmti_env,
137 void** new_address_ptr){
138 log_text ("JVMTI-Event: IMPLEMENT ME!!!");
141 static void Exception (jvmtiEnv *jvmti_env,
147 jmethodID catch_method,
148 jlocation catch_location){
149 log_text ("JVMTI-Event: IMPLEMENT ME!!!");
152 static void ExceptionCatch (jvmtiEnv *jvmti_env,
158 log_text ("JVMTI-Event: IMPLEMENT ME!!!");
161 static void ThreadStart (jvmtiEnv *jvmti_env,
164 log_text ("JVMTI-Event: IMPLEMENT ME!!!");
167 static void ThreadEnd (jvmtiEnv *jvmti_env,
170 log_text ("JVMTI-Event: IMPLEMENT ME!!!");
173 static void ClassLoad (jvmtiEnv *jvmti_env,
177 log_text ("JVMTI-Event: IMPLEMENT ME!!!");
180 static void ClassPrepare (jvmtiEnv *jvmti_env,
184 log_text ("JVMTI-Event: IMPLEMENT ME!!!");
187 static void ClassFileLoadHook (jvmtiEnv *jvmti_env,
189 jclass class_being_redefined,
192 jobject protection_domain,
194 const unsigned char* class_data,
195 jint* new_class_data_len,
196 unsigned char** new_class_data){
197 log_text ("JVMTI-Event: IMPLEMENT ME!!!");
200 static void VMStart (jvmtiEnv *jvmti_env,
202 log_text ("JVMTI-Event: IMPLEMENT ME!!!");
205 static void VMInit (jvmtiEnv *jvmti_env,
208 log_text ("JVMTI-Event: IMPLEMENT ME!!!");
211 static void VMDeath (jvmtiEnv *jvmti_env,
213 log_text ("JVMTI-Event: IMPLEMENT ME!!!");
217 static void CompiledMethodLoad (jvmtiEnv *jvmti_env,
220 const void* code_addr,
222 const jvmtiAddrLocationMap* map,
223 const void* compile_info) {
224 log_text ("JVMTI-Event: IMPLEMENT ME!!!");
227 static void CompiledMethodUnload (jvmtiEnv *jvmti_env,
229 const void* code_addr){
230 log_text ("JVMTI-Event: IMPLEMENT ME!!!");
233 static void DynamicCodeGenerated (jvmtiEnv *jvmti_env,
237 log_text ("JVMTI-Event: IMPLEMENT ME!!!");
240 static void DataDumpRequest (jvmtiEnv *jvmti_env){
241 log_text ("JVMTI-Event: IMPLEMENT ME!!!");
244 static void MonitorContendedEnter (jvmtiEnv *jvmti_env,
248 log_text ("JVMTI-Event: IMPLEMENT ME!!!");
251 static void MonitorContendedEntered (jvmtiEnv *jvmti_env,
255 log_text ("JVMTI-Event: IMPLEMENT ME!!!");
258 static void MonitorWait (jvmtiEnv *jvmti_env,
263 log_text ("JVMTI-Event: IMPLEMENT ME!!!");
266 static void MonitorWaited (jvmtiEnv *jvmti_env,
271 log_text ("JVMTI-Event: IMPLEMENT ME!!!");
274 static void VMObjectAlloc (jvmtiEnv *jvmti_env,
280 log_text ("JVMTI-Event: IMPLEMENT ME!!!");
283 static void ObjectFree (jvmtiEnv *jvmti_env,
285 log_text ("JVMTI-Event: IMPLEMENT ME!!!");
288 static void GarbageCollectionStart (jvmtiEnv *jvmti_env){
289 log_text ("JVMTI-Event: IMPLEMENT ME!!!");
292 static void GarbageCollectionFinish (jvmtiEnv *jvmti_env){
293 log_text ("JVMTI-Event: IMPLEMENT ME!!!");
297 jvmtiEventCallbacks jvmti_jdwp_EventCallbacks = {
317 &CompiledMethodUnload,
318 &DynamicCodeGenerated,
323 &MonitorContendedEnter,
324 &MonitorContendedEntered,
329 &GarbageCollectionStart,
330 &GarbageCollectionFinish,
337 * These are local overrides for various environment variables in Emacs.
338 * Please do not remove this and leave it at the end of the file, where
339 * Emacs will automagically detect them.
340 * ---------------------------------------------------------------------
343 * indent-tabs-mode: t