harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odea...@apache.org
Subject svn commit: r797085 - /harmony/enhanced/jdktools/branches/java6/modules/jpda/src/main/native/jdwp/common/agent/core/AgentEventRequest.cpp
Date Thu, 23 Jul 2009 14:36:38 GMT
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 */
 



Mime
View raw message