Skip to content

Commit

Permalink
We now report all class prepare events, but won't send thread/frame i…
Browse files Browse the repository at this point in the history
…nformation in case the class wasn't registered with a corresponding class prepare event. This is required for IDEA
  • Loading branch information
badlogic committed Mar 30, 2015
1 parent c208164 commit de17ec5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,5 +1,6 @@
*~
*.o
*.iml
a.out
*.class
.*
Expand Down
11 changes: 10 additions & 1 deletion vm/core/src/hooks.c
Expand Up @@ -1311,7 +1311,7 @@ void _rvmHookClassLoaded(Env* env, Class* clazz, void* classInfo) {
// check if there's a filter for that class
rvmLockMutex(&classFilterMutex);
for(ClassFilter* f = classFilters; f; f = f->next) {
if(!strcmp(f->className, clazz->name)) {
if(!strcmp(f->className, clazz->name)) {
if(env->currentThread) {
javaThread = env->currentThread->threadObj;
thread = env->currentThread;
Expand All @@ -1334,6 +1334,15 @@ void _rvmHookClassLoaded(Env* env, Class* clazz, void* classInfo) {
thread = NULL;
callStackPayloadSize = 0;
}

if (IS_DEBUG_ENABLED) {
DEBUGF("Suspending thread %p with id %u due to class load event %s", env->currentThread,
env->currentThread->threadId, clazz->name);
}
} else {
if (IS_DEBUG_ENABLED) {
DEBUGF("Not suspending thread due to class load event %s", clazz->name);
}
}

// DEBUGF("Loaded class %s, Class*: %p, ClassInfo*: %p, Thread*: %p", clazz->name, clazz, classInfo, thread);
Expand Down

0 comments on commit de17ec5

Please sign in to comment.