You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by od...@apache.org on 2009/07/23 16:36:38 UTC

svn commit: r797085 - /harmony/enhanced/jdktools/branches/java6/modules/jpda/src/main/native/jdwp/common/agent/core/AgentEventRequest.cpp

Author: odeakin
Date: Thu Jul 23 14:36:38 2009
New Revision: 797085

URL: http://svn.apache.org/viewvc?rev=797085&view=rev
Log:
On zOS we must ensure that default_stratum is converted to EBCDIC before making any system string calls on it, such as strcmp().

Modified:
    harmony/enhanced/jdktools/branches/java6/modules/jpda/src/main/native/jdwp/common/agent/core/AgentEventRequest.cpp

Modified: harmony/enhanced/jdktools/branches/java6/modules/jpda/src/main/native/jdwp/common/agent/core/AgentEventRequest.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/branches/java6/modules/jpda/src/main/native/jdwp/common/agent/core/AgentEventRequest.cpp?rev=797085&r1=797084&r2=797085&view=diff
==============================================================================
--- harmony/enhanced/jdktools/branches/java6/modules/jpda/src/main/native/jdwp/common/agent/core/AgentEventRequest.cpp (original)
+++ harmony/enhanced/jdktools/branches/java6/modules/jpda/src/main/native/jdwp/common/agent/core/AgentEventRequest.cpp Thu Jul 23 14:36:38 2009
@@ -172,6 +172,16 @@
 #ifdef ZOS
     /* Make sure we pass EBCDIC strings to zOS system functions */
     __atoe(sourceDebugExtension);
+    if (default_stratum != NULL) {
+        // Copy the string so we only convert the local version to EBCDIC
+        char *temp = (char*)GetMemoryManager().Allocate(strlen(default_stratum)+1 JDWP_FILE_LINE);
+        strcpy(temp, default_stratum);
+        default_stratum = temp;
+        __atoe(default_stratum);
+    }
+    // This is ok to do here since JvmtiAutoFree checks if the pointer is NULL
+    // before freeing
+    JvmtiAutoFree autoFreeDefaultStratum(default_stratum); 
 #pragma convlit(suspend)
 #endif /* ZOS */