src/vm/vm.c (vm_exit): only set JVMTI_PHASE_DEAD if a jvmti agent or a jvmti environm...
authormotse <none@none>
Wed, 24 May 2006 11:00:38 +0000 (11:00 +0000)
committermotse <none@none>
Wed, 24 May 2006 11:00:38 +0000 (11:00 +0000)
src/native/jvmti/cacaodbg.c (jvmti_cacaodbgserver_quit): bugfix: set dbgcom = NULL only if all environments have been disposed.
src/native/jvmti/jvmti.c (GetLoadedClasses): remove debug statement

src/native/jvmti/cacaodbg.c
src/native/jvmti/jvmti.c
src/vm/vm.c

index 96dae2473d63b75589d5b94537b3620561c2da55..9a2e2776d126d6e9d6cb395261cac6b4de807ffb 100644 (file)
@@ -286,8 +286,8 @@ void jvmti_cacaodbgserver_quit(){
                TRAP;
                /* get cacaodbserver exit */
                wait(NULL);
+               dbgcom = NULL;
        }
-       dbgcom = NULL;
        pthread_mutex_unlock(&dbgcomlock);
 }
 
index 85a69bfb385015e5f5d1710f8996a0f791234cc4..6ddd906390a49f60829452b7c849361a40587f1f 100644 (file)
@@ -31,7 +31,7 @@
             Samuel Vinson
 
    
-   $Id: jvmti.c 4945 2006-05-23 19:52:47Z motse $
+   $Id: jvmti.c 4946 2006-05-24 11:00:38Z motse $
 
 */
 
@@ -2534,10 +2534,9 @@ GetLoadedClasses (jvmtiEnv * env, jint * class_count_ptr, jclass ** classes_ptr)
                        /* filter pseudo classes $NEW$,$NULL$,$ARRAYSTUB$ out */
                        if (nameentry->name->text[0]=='$')
                        {
-                               log_println("%s", nameentry->name->text);
                                *class_count_ptr -= 1;
                                break;
-                               }
+                       }
 
                        classentry = nameentry->classes;
                        while (classentry != NULL){ /* iterate over classes with same name */
index dc5d2156cce6987a2480ec800a37f451a5776374..3e83884de714dadc87696735416433e6d00002e1 100644 (file)
@@ -1277,8 +1277,10 @@ void vm_exit(s4 status)
        assert(class_java_lang_System->state & CLASS_LOADED);
 
 #if defined(ENABLE_JVMTI)
-       jvmti_set_phase(JVMTI_PHASE_DEAD);
-       if (jvmti) jvmti_agentunload();
+       if (jvmti || (dbgcom!=NULL)) {
+               jvmti_set_phase(JVMTI_PHASE_DEAD);
+               if (jvmti) jvmti_agentunload();
+       }
 #endif
 
        if (!link_class(class_java_lang_System))