You are viewing a plain text version of this content. The canonical link for it is here.
Posted to kato-commits@incubator.apache.org by sp...@apache.org on 2009/06/18 12:40:42 UTC

svn commit: r786039 - in /incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti: .project .pydevproject pom.xml src/ src/MANIFEST src/init.py src/kato/XMLDump.py

Author: spoole
Date: Thu Jun 18 12:40:41 2009
New Revision: 786039

URL: http://svn.apache.org/viewvc?rev=786039&view=rev
Log:
updated native pyjmvti project to produce binary packages

Added:
    incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/.pydevproject
    incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/src/MANIFEST
    incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/src/init.py
Modified:
    incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/.project
    incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/pom.xml
    incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/src/   (props changed)
    incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/src/kato/XMLDump.py

Modified: incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/.project
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/.project?rev=786039&r1=786038&r2=786039&view=diff
==============================================================================
--- incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/.project (original)
+++ incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/.project Thu Jun 18 12:40:41 2009
@@ -1,11 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-	<name>kato.pyjvmti</name>
+	<name>kato.native.pyjvmti</name>
 	<comment></comment>
 	<projects>
 	</projects>
 	<buildSpec>
 		<buildCommand>
+			<name>org.python.pydev.PyDevBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
 			<name>org.eclipse.jdt.core.javabuilder</name>
 			<arguments>
 			</arguments>
@@ -19,5 +24,6 @@
 	<natures>
 		<nature>org.eclipse.jdt.core.javanature</nature>
 		<nature>org.maven.ide.eclipse.maven2Nature</nature>
+		<nature>org.python.pydev.pythonNature</nature>
 	</natures>
 </projectDescription>

Added: incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/.pydevproject
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/.pydevproject?rev=786039&view=auto
==============================================================================
--- incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/.pydevproject (added)
+++ incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/.pydevproject Thu Jun 18 12:40:41 2009
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?eclipse-pydev version="1.0"?>
+
+<pydev_project>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.6</pydev_property>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
+</pydev_project>

Modified: incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/pom.xml
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/pom.xml?rev=786039&r1=786038&r2=786039&view=diff
==============================================================================
--- incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/pom.xml (original)
+++ incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/pom.xml Thu Jun 18 12:40:41 2009
@@ -32,6 +32,8 @@
             <argument>setup.py</argument>
             <argument>${sdk.install.dir}</argument>
             <argument>build</argument>
+            <argument>sdist</argument>
+            <argument>bdist</argument>
           </arguments>
           
         </configuration>

Propchange: incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/src/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Thu Jun 18 12:40:41 2009
@@ -1 +1,2 @@
 build
+dist

Added: incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/src/MANIFEST
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/src/MANIFEST?rev=786039&view=auto
==============================================================================
--- incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/src/MANIFEST (added)
+++ incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/src/MANIFEST Thu Jun 18 12:40:41 2009
@@ -0,0 +1,15 @@
+pyjvmti.c
+setup.py
+kato/BinDump.py
+kato/Dump.py
+kato/JClass.py
+kato/JClassLoader.py
+kato/JField.py
+kato/JMethod.py
+kato/JStackFrame.py
+kato/JThread.py
+kato/JThreadGroup.py
+kato/PrintDump.py
+kato/XMLDump.py
+kato/__init__.py
+kato/console.py

Added: incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/src/init.py
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/src/init.py?rev=786039&view=auto
==============================================================================
--- incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/src/init.py (added)
+++ incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/src/init.py Thu Jun 18 12:40:41 2009
@@ -0,0 +1,60 @@
+#*******************************************************************************
+ #* Licensed under the Apache License, Version 2.0 (the "License");
+ #* you may not use this file except in compliance with the License.
+ #* You may obtain a copy of the License at
+ #* 
+ #*   http://www.apache.org/licenses/LICENSE-2.0
+ #* 
+ #* Unless required by applicable law or agreed to in writing, software
+ #* distributed under the License is distributed on an "AS IS" BASIS,
+ #* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ #* See the License for the specific language governing permissions and
+ #* limitations under the License.
+ #******************************************************************************"
+
+#
+# Sample Initiation file called by pyjvmti to set callback to recieve exceptions
+#
+#
+import jvmti
+import time
+
+import kato.console as console
+from kato.JMethod import JMethod
+from kato.JClass import JClass
+
+def exceptionFilter(vm,env,thread,method,location,exception,catch_method,catch_location):
+    
+    #phase=jvmti.getPhase()
+    #print "phase %d  " % phase
+    #print "vm=%d env=%d thread=%d method=%d location=%d exception=%d catch=%d loc=%d" % (vm,env,thread,method,location,exception,catch_method,catch_location)
+    
+    
+
+    if exception != 0 :
+        classid=jvmti.getObjectClass(exception)
+        clazz=JClass(classid)
+        if clazz.signature=="Ljava/lang/ArrayIndexOutOfBoundsException;" :
+            print("OOB"*20) 
+            console.save()
+            #time.sleep(30)
+        else :
+            jvmti.deleteLocalRef(classid)
+    return
+        
+    if method != 0 :
+        print "method=" , method
+        m=JMethod(method);
+        print "method=" , m.name
+    else :
+        print "?"
+        
+    print "done"
+    
+def e2() :
+    print "in an empty"
+
+jvmti.registerExceptionFilter(exceptionFilter)
+
+
+

Modified: incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/src/kato/XMLDump.py
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/src/kato/XMLDump.py?rev=786039&r1=786038&r2=786039&view=diff
==============================================================================
--- incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/src/kato/XMLDump.py (original)
+++ incubator/kato/branches/experimental/maven_restructure/org.apache.kato.native/kato.native.pyjvmti/src/kato/XMLDump.py Thu Jun 18 12:40:41 2009
@@ -498,7 +498,7 @@
         else :
             kml.write('<method id="%d" name="%s" sig="%s" maxlocals="%d">\n' % (method.methodid,method.name,method.signature,method.maxlocals))
             for var in localvars :
-                kml.write('<vardef sig="%s" start="%d" length="%d" slot="%d"/>\n' % (var.signature,var.start,var.length,var.slot))
+                kml.write('<vardef sig="%s" name="%s" start="%d" length="%d" slot="%d"/>\n' % (var.signature,var.name,var.start,var.length,var.slot))
             kml.write("</method>\n")
         
 def writeHeader(kml):