/* src/native/jvmti/jvmti.c - implementation of the Java Virtual Machine
Tool Interface functions
- Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
- C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
- E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
- J. Wenninger, Institut f. Computersprachen - TU Wien
+ Copyright (C) 1996-2005, 2006, 2007, 2008
+ CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
This file is part of CACAO.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- Contact: cacao@cacaojvm.org
-
- Author: Martin Platter
-
- Changes: Edwin Steiner
- Samuel Vinson
- Christan Thalinger
-
- $Id: jvmti.c 5806 2006-10-19 10:10:23Z twisti $
-
*/
#include <unistd.h>
#include <sched.h>
-#include "native/jni.h"
+#include "native/jni.hpp"
#include "native/native.h"
#include "native/jvmti/cacaodbg.h"
#include "native/jvmti/jvmti.h"
-#include "vm/jit/stacktrace.h"
+#include "vm/jit/stacktrace.hpp"
#include "vm/global.h"
-#include "vm/loader.h"
-#include "vm/builtin.h"
+#include "vm/loader.hpp"
+#include "vm/jit/builtin.hpp"
#include "vm/jit/asmpart.h"
#include "vm/class.h"
#include "vm/classcache.h"
-#include "mm/boehm.h"
+#include "mm/gc.hpp"
#include "toolbox/logging.h"
#include "vm/options.h"
-#include "vm/stringlocal.h"
+#include "vm/string.hpp"
#include "mm/memory.h"
-#include "threads/native/threads.h"
-#include "threads/native/lock.h"
-#include "vm/exceptions.h"
-#include "native/include/java_util_Vector.h"
+#include "threads/mutex.h"
+#include "threads/thread.hpp"
+#include "threads/lock-common.h"
+#include "vm/exceptions.hpp"
#include "native/include/java_io_PrintStream.h"
#include "native/include/java_io_InputStream.h"
#include "native/include/java_lang_Cloneable.h"
#include "native/include/java_lang_VMObject.h"
#include "native/include/java_lang_VMSystem.h"
#include "native/include/java_lang_VMClass.h"
-#include "vm/suck.h"
+#include "vm/suck.hpp"
#include "boehm-gc/include/gc.h"
#if defined(ENABLE_THREADS)
-#include "threads/native/threads.h"
#include <sched.h>
#include <pthread.h>
#endif
typedef struct _environment environment;
static environment *envs=NULL;
-pthread_mutex_t dbgcomlock;
+mutex_t dbgcomlock;
extern const struct JNIInvokeInterface _Jv_JNIInvokeInterface;
om=MNEW(java_objectheader*,size);
- pthread_mutex_lock(&lock_global_pool_lock);
+ mutex_lock(&lock_global_pool_lock);
lrp=lock_global_pool;
/* iterate over all lock record pools */
lrp=lrp->header.next;
}
- pthread_mutex_unlock(&lock_global_pool_lock);
+ mutex_unlock(&lock_global_pool_lock);
*owned_monitors_ptr =
heap_allocate(sizeof(java_objectheader*) * i, true, NULL);
#if defined(ENABLE_THREADS)
- pthread_mutex_lock(&lock_global_pool_lock);
+ mutex_lock(&lock_global_pool_lock);
lrp=lock_global_pool;
lrp=lrp->header.next;
}
- pthread_mutex_unlock(&lock_global_pool_lock);
+ mutex_unlock(&lock_global_pool_lock);
#endif
if (false) *thread_state_ptr |= JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT;
if (false) *thread_state_ptr |= JVMTI_THREAD_STATE_IN_OBJECT_WAIT;
if (false) *thread_state_ptr |= JVMTI_THREAD_STATE_PARKED;
- if (t->sleeping) *thread_state_ptr |= JVMTI_THREAD_STATE_SLEEPING;
+ if (false) *thread_state_ptr |= JVMTI_THREAD_STATE_SLEEPING;
}
#else
return JVMTI_ERROR_INTERNAL;
GetFrameLocation (jvmtiEnv * env, jthread thread, jint depth,
jmethodID * method_ptr, jlocation * location_ptr)
{
- stackframeinfo *sfi;
+ stackframeinfo_t *sfi;
int i;
threadobject* th;
if (i>depth) return JVMTI_ERROR_NO_MORE_FRAMES;
- *method_ptr=(jmethodID)sfi->method;
+ *method_ptr=(jmethodID)sfi->code->m;
*location_ptr = 0; /* todo: location MachinePC not avilable - Linenumber not expected */
return JVMTI_ERROR_NONE;