harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r559138 - in /harmony/enhanced/jdktools/trunk/modules/jpda: make/ src/main/native/jdwp/common/agent/core/
Date Tue, 24 Jul 2007 17:49:30 GMT
Author: gshimansky
Date: Tue Jul 24 10:49:29 2007
New Revision: 559138

URL: http://svn.apache.org/viewvc?view=rev&rev=559138
Log:
Applied patch from HARMONY-3472
[jdktools][jpda] improve JDWP agent reset procedure for multiple sessions


Modified:
    harmony/enhanced/jdktools/trunk/modules/jpda/make/exclude.common
    harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/common/agent/core/EventDispatcher.cpp
    harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/common/agent/core/EventDispatcher.h
    harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/common/agent/core/PacketDispatcher.cpp

Modified: harmony/enhanced/jdktools/trunk/modules/jpda/make/exclude.common
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/jpda/make/exclude.common?view=diff&rev=559138&r1=559137&r2=559138
==============================================================================
--- harmony/enhanced/jdktools/trunk/modules/jpda/make/exclude.common (original)
+++ harmony/enhanced/jdktools/trunk/modules/jpda/make/exclude.common Tue Jul 24 10:49:29 2007
@@ -3,20 +3,5 @@
 #3309
 org/apache/harmony/jpda/tests/jdwp/ObjectReference/EnableCollectionTest.java
 org/apache/harmony/jpda/tests/jdwp/MultiSession/EnableCollectionTest.java
-#3317
-org/apache/harmony/jpda/tests/jdwp/ReferenceType/GetValues003Test.java
 #3341
 org/apache/harmony/jpda/tests/jdwp/ThreadReference/StopTest.java
-#3472
-org/apache/harmony/jpda/tests/jdwp/MultiSession/ClassPrepareTest.java
-org/apache/harmony/jpda/tests/jdwp/MultiSession/BreakpointTest.java
-org/apache/harmony/jpda/tests/jdwp/MultiSession/ExceptionTest.java
-org/apache/harmony/jpda/tests/jdwp/MultiSession/FieldAccessTest.java
-org/apache/harmony/jpda/tests/jdwp/MultiSession/FieldModificationTest.java
-org/apache/harmony/jpda/tests/jdwp/MultiSession/MethodEntryExitTest.java
-org/apache/harmony/jpda/tests/jdwp/MultiSession/SingleStepTest.java
-org/apache/harmony/jpda/tests/jdwp/MultiSession/ThreadEndTest.java
-org/apache/harmony/jpda/tests/jdwp/MultiSession/ThreadStartTest.java
-org/apache/harmony/jpda/tests/jdwp/MultiSession/VMDeathTest.java
-#3866
-org/apache/harmony/jpda/tests/jdwp/ThreadReference/OwnedMonitorsTest.java

Modified: harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/common/agent/core/EventDispatcher.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/common/agent/core/EventDispatcher.cpp?view=diff&rev=559138&r1=559137&r2=559138
==============================================================================
--- harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/common/agent/core/EventDispatcher.cpp
(original)
+++ harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/common/agent/core/EventDispatcher.cpp
Tue Jul 24 10:49:29 2007
@@ -151,8 +151,6 @@
         MonitorAutoLock lock(m_invokeMonitor JDWP_FILE_LINE);
         m_invokeMonitor->NotifyAll();
     }
-
-//    m_resetFlag = false;
 }
 
 void EventDispatcher::Stop(JNIEnv *jni) throw(AgentException) {
@@ -238,6 +236,13 @@
     MonitorAutoLock lock(m_queueMonitor JDWP_FILE_LINE);
     m_holdFlag = false;
     m_queueMonitor->NotifyAll();
+}
+
+void EventDispatcher::NewSession() throw(AgentException) {
+    JDWP_TRACE_ENTRY("NewSession()");
+
+    m_resetFlag = false;
+    m_holdFlag = true;
 }
 
 void EventDispatcher::PostInvokeSuspend(JNIEnv *jni, SpecialAsyncCommandHandler* handler)


Modified: harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/common/agent/core/EventDispatcher.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/common/agent/core/EventDispatcher.h?view=diff&rev=559138&r1=559137&r2=559138
==============================================================================
--- harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/common/agent/core/EventDispatcher.h
(original)
+++ harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/common/agent/core/EventDispatcher.h
Tue Jul 24 10:49:29 2007
@@ -129,6 +129,13 @@
         void ReleaseEvents() throw(AgentException);
 
         /**
+         * Informs that new session started.
+         *
+         * @exception If any error occurs, <code>AgentException</code> is thrown.
+         */
+        void NewSession() throw(AgentException);
+
+        /**
          * Generates new ID for the event packet.
          */
         jint NewId() throw() { return m_idCount++; }

Modified: harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/common/agent/core/PacketDispatcher.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/common/agent/core/PacketDispatcher.cpp?view=diff&rev=559138&r1=559137&r2=559138
==============================================================================
--- harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/common/agent/core/PacketDispatcher.cpp
(original)
+++ harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/common/agent/core/PacketDispatcher.cpp
Tue Jul 24 10:49:29 2007
@@ -113,6 +113,9 @@
                 // start session and execute commands
                 try
                 {
+                    // inform that new session started
+                    GetEventDispatcher().NewSession();
+        
                     // add internal request for automatic VMDeath event with no modifiers
                     GetRequestManager().AddInternalRequest(jni,
                         new AgentEventRequest(JDWP_EVENT_VM_DEATH, JDWP_SUSPEND_NONE));
@@ -202,7 +205,8 @@
         }
         catch (const AgentException& e)
         {
-            JDWP_TRACE_PROG("Run: Exception in stopping EventDispatcher: "
+            // just report an error, cannot do anything else
+            JDWP_ERROR("Exception in stopping EventDispatcher: "
                             << e.what() << " [" << e.ErrCode() <<
"]");
         }
 



Mime
View raw message