incubator-kato-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spo...@apache.org
Subject svn commit: r897602 [1/2] - in /incubator/kato/trunk/org.apache.kato: kato.api/src/main/java/javax/tools/diagnostics/image/ kato.api/src/main/java/javax/tools/diagnostics/runtime/java/ kato.api/src/test/java/test/apache/kato/ kato.cjvmti/src/main/java/...
Date Sun, 10 Jan 2010 09:10:37 GMT
Author: spoole
Date: Sun Jan 10 09:09:45 2010
New Revision: 897602

URL: http://svn.apache.org/viewvc?rev=897602&view=rev
Log:
Bulk update with support for new Handle object and NativeMemoryAccess

Added:
    incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JHandle.java
Modified:
    incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/image/NativeMemoryAccess.java
    incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaClass.java
    incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaHeap.java
    incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaLocation.java
    incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaMethod.java
    incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaMonitor.java
    incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaObject.java
    incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaRuntime.java
    incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaStackFrame.java
    incubator/kato/trunk/org.apache.kato/kato.api/src/test/java/test/apache/kato/TestFactoryRegistry.java
    incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/JavaRuntimeImpl.java
    incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JClass.java
    incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JHeap.java
    incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JLocation.java
    incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JMethod.java
    incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JMonitor.java
    incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JObject.java
    incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JStackFrame.java
    incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/image/CorruptDataImpl.java
    incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/IJavaHeapInternal.java
    incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaClassImpl.java
    incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaClassLoaderImpl.java
    incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaHeapImpl.java
    incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaObjectArrayImpl.java
    incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaObjectInstanceImpl.java
    incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaPrimitiveArrayImpl.java
    incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaPrimitiveClassImpl.java
    incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaRuntimeImpl.java
    incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaStackFrameImpl.java
    incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaSyntheticPrimitiveArrayImpl.java
    incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/test/java/org/apache/kato/hprof/java/JavaHeapImplTest.java
    incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/test/java/org/apache/kato/hprof/java/JavaPrimitiveClassImplTest.java
    incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/test/java/test/apache/kato/hprof/java/TestJavaHeap.java
    incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/test/java/test/apache/kato/hprof/java/TestJavaRuntime.java
    incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/KatoReader.java
    incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/scenario142/javaruntime/TestJavaMonitor_ObjectMonitors.java
    incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/tests/legacy/TestCompiledMethods.java
    incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/tests/legacy/TestJavaHeaps.java
    incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/tests/legacy/TestJavaObjects.java
    incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/tests/legacy/TestJavaRuntime.java
    incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/ImageSectionTest.java
    incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/JavaClassTest.java
    incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/JavaHeapTest.java
    incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/JavaLocationTest.java
    incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/JavaMethodTest.java
    incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/JavaRuntimeTest.java
    incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/JavaStackFrameTest.java
    incubator/kato/trunk/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/WhatisCommand.java
    incubator/kato/trunk/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/infocommands/InfoHeapCommand.java
    incubator/kato/trunk/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/infocommands/InfoJitmCommand.java
    incubator/kato/trunk/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/infocommands/InfoThreadCommand.java

Modified: incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/image/NativeMemoryAccess.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/image/NativeMemoryAccess.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/image/NativeMemoryAccess.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/image/NativeMemoryAccess.java Sun Jan 10 09:09:45 2010
@@ -33,6 +33,9 @@
      * @see javax.tools.diagnostics.image.CorruptData
      */
     List<ImageSection> getSections();
+
+	
+	ImagePointer getAddress();
     
    
     

Modified: incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaClass.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaClass.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaClass.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaClass.java Sun Jan 10 09:09:45 2010
@@ -16,7 +16,6 @@
 import java.util.List;
 
 import javax.tools.diagnostics.image.CorruptDataException;
-import javax.tools.diagnostics.image.ImagePointer;
 
 
 
@@ -207,7 +206,7 @@
      * 
      * @return a pointer to the class
      */
-	ImagePointer getID();
+	Handle getID();
 	
 	/**
 	 * <p>

Modified: incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaHeap.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaHeap.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaHeap.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaHeap.java Sun Jan 10 09:09:45 2010
@@ -31,21 +31,7 @@
  */
 public interface JavaHeap {
     
-    /**
-     * Get the set of memory regions that represent the memory layout of the heap.
-     * The actual make up of this list is implementation specific.
-     * 
-     * The returned list follows the standard semantics for javax.tools.diagnostics collections.
-     * 
-     * The returned value is never null but can be an empty list.
-     *
-     * @return a list  of {@link ImageSection} instances 
-     * 
-     * 
-     * @see javax.tools.diagnostics.image.ImageSection
-     */
-    List<ImageSection> getSections();
-    
+   
     /**
      * Get a brief textual description of this heap.
      * The value returned is  implementation specific.

Modified: incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaLocation.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaLocation.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaLocation.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaLocation.java Sun Jan 10 09:09:45 2010
@@ -24,28 +24,6 @@
  */
 public interface JavaLocation {
 	
-	/**
-	 * <p>
-	 * Fetches the absolute address of the code which this location represents.
-	 * This pointer will be contained within one of the segments returned by
-	 * getBytecodeSections() or getCompiledSections() of the method returned by
-	 * getMethod().
-	 * <p>
-	 * null may be returned, particularly for methods with no bytecode or 
-	 * compiled sections (e.g. some native methods)
-	 * <p>
-	 * Although an offset into the method may be calculated using this 
-	 * pointer, caution should be exercised in attempting to map this offset to
-	 * an offset within the original class file. Various transformations may
-	 * have been applied to the bytecodes by the VM or other agents which may
-	 * make the offset difficult to interpret.
-	 * <p>
-	 * For native methods, the address may be meaningless.
-	 * 
-	 * @return the address in memory of the managed code
-	 * @throws CorruptDataException if the underlying data is in an unexpected state 
-	 */
-	ImagePointer getAddress() throws CorruptDataException;
 	
 	/**
 	 * <p>
@@ -109,4 +87,8 @@
 	 */
 	public boolean equals(Object obj);
 	public int hashCode();
+	
+	public long getAddress();
+	
+	
 }

Modified: incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaMethod.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaMethod.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaMethod.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaMethod.java Sun Jan 10 09:09:45 2010
@@ -46,21 +46,6 @@
      */
     List<ImageSection> getBytecodeSections();
 
-    /**
-     * <p>
-     * Get the set of ImageSections containing the compiled code of this method.
-     * <p>
-     * Each ImageSection contains data (usually executable code) used
-     * in executing this method in compiled mode.
-     * <p>The returned list follows the standard semantics for javax.tools.diagnostics collections.</p>
-     * <p>The returned list is never null but could be empty.</p>
-     * 
-     * @return a list of ImageSections.
-     * 
-     * @see javax.tools.diagnostics.image.ImageSection
-     * 
-     */
-    List<ImageSection> getSections();
     
     
     /**

Modified: incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaMonitor.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaMonitor.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaMonitor.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaMonitor.java Sun Jan 10 09:09:45 2010
@@ -17,7 +17,6 @@
 import java.util.List;
 
 import javax.tools.diagnostics.image.CorruptDataException;
-import javax.tools.diagnostics.image.ImagePointer;
 
 
 
@@ -111,7 +110,7 @@
      * 
      * @return The pointer which uniquely identifies this monitor in memory.
      */
-    ImagePointer getID();
+    Handle getID();
     
 	/**
 	 * @param obj

Modified: incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaObject.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaObject.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaObject.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaObject.java Sun Jan 10 09:09:45 2010
@@ -18,7 +18,6 @@
 
 import javax.tools.diagnostics.image.CorruptDataException;
 import javax.tools.diagnostics.image.DataUnavailable;
-import javax.tools.diagnostics.image.ImagePointer;
 import javax.tools.diagnostics.image.ImageSection;
 import javax.tools.diagnostics.image.MemoryAccessException;
 
@@ -146,7 +145,7 @@
      * @return the runtime-wide unique identifier for the object.
      * 
      */
-	ImagePointer getID();
+	Handle getID();
 	
     /**
      * <p>Returns the sections that this object occupies in memory.</p>

Modified: incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaRuntime.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaRuntime.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaRuntime.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaRuntime.java Sun Jan 10 09:09:45 2010
@@ -38,14 +38,7 @@
  */
 public interface JavaRuntime extends ManagedRuntime {
 
-    /**
-     * Get the object that represents the virtual machine
-     * @return the address of the JavaVM structure which represents this JVM instance in JNI
-     * 
-     * @throws CorruptDataException 
-     */
-    ImagePointer getJavaVM() throws CorruptDataException;
-    
+   
     /**
      * Fetch the {@link JavaVMInitArgs} which were used to create this VM.
      * See <a href="http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html#wp16334">JNI_CreateJavaVM</a> in the JNI Specification for more details.
@@ -184,8 +177,20 @@
      * @throws 	DataUnavailable	 			if any data needed to build the returned instance of <code>JavaObject</code> is not available.
      * @see 	javax.tools.diagnostics.runtime.java.JavaObject
      */
-     JavaObject getObjectAtAddress(ImagePointer address) throws CorruptDataException, IllegalArgumentException, MemoryAccessException, DataUnavailable;
+     JavaObject getObjectByHandle(Handle handle) throws CorruptDataException, IllegalArgumentException, MemoryAccessException, DataUnavailable;
     
+     
+     /**
+      * Converts the external form of an handle to an object capable of being used to retrieve
+      * objects from this runtime.
+      * 
+      * @param  type - type of entity to create handle for
+      * @param  reference - implementation specific reference for the type instance
+      * @throws IllegalArgumentException if the type is null or otherwise invalid
+      * @return object instance of handle
+      */
+     Handle createHandle(EntityType type,long reference) throws IllegalArgumentException;
+     
 	/**
 	 * @param obj
 	 * @return true if the given object refers to the same Java Runtime in the image

Modified: incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaStackFrame.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaStackFrame.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaStackFrame.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaStackFrame.java Sun Jan 10 09:09:45 2010
@@ -28,15 +28,6 @@
  *
  */
 public interface JavaStackFrame {
-    /**
-     * <p>Get a pointer to the base of this stack frame within memory.</p>
-     * <p>The layout of a <code>JavaStackFrame</code> is implementation specific.
-     * </p>
-     * 
-     * @return the base pointer of the stack frame
-     * @throws CorruptDataException 
-     */
-    ImagePointer getBasePointer() throws CorruptDataException;
     
 	/**
      * <p>
@@ -104,4 +95,6 @@
 	 */
 	public boolean equals(Object obj);
 	public int hashCode();
+	
+	public Handle getID();
 }

Modified: incubator/kato/trunk/org.apache.kato/kato.api/src/test/java/test/apache/kato/TestFactoryRegistry.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.api/src/test/java/test/apache/kato/TestFactoryRegistry.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.api/src/test/java/test/apache/kato/TestFactoryRegistry.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.api/src/test/java/test/apache/kato/TestFactoryRegistry.java Sun Jan 10 09:09:45 2010
@@ -25,6 +25,8 @@
 import javax.tools.diagnostics.image.ImageFactory;
 import javax.tools.diagnostics.image.ImagePointer;
 import javax.tools.diagnostics.image.MemoryAccessException;
+import javax.tools.diagnostics.runtime.java.EntityType;
+import javax.tools.diagnostics.runtime.java.Handle;
 import javax.tools.diagnostics.runtime.java.JavaClassLoader;
 import javax.tools.diagnostics.runtime.java.JavaHeap;
 import javax.tools.diagnostics.runtime.java.JavaMethod;
@@ -109,12 +111,7 @@
 			// TODO Auto-generated method stub
 			return null;
 		}
-
-		@Override
-		public ImagePointer getJavaVM() throws CorruptDataException {
-			// TODO Auto-generated method stub
-			return null;
-		}
+	
 
 		@Override
 		public JavaVMInitArgs getJavaVMInitArgs() throws DataUnavailable,
@@ -130,7 +127,7 @@
 		}
 
 		@Override
-		public JavaObject getObjectAtAddress(ImagePointer address)
+		public JavaObject getObjectByHandle(Handle handle)
 				throws CorruptDataException, IllegalArgumentException,
 				MemoryAccessException, DataUnavailable {
 			// TODO Auto-generated method stub
@@ -167,6 +164,16 @@
 			// TODO Auto-generated method stub
 			return null;
 		}
+
+		/* (non-Javadoc)
+		 * @see javax.tools.diagnostics.runtime.java.JavaRuntime#createHandle(java.lang.String)
+		 */
+		@Override
+		public Handle createHandle(EntityType type,long reference)
+				throws IllegalArgumentException {
+			// TODO Auto-generated method stub
+			return null;
+		}
 		
 	}
 	private static final class MockImage implements Image {

Modified: incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/JavaRuntimeImpl.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/JavaRuntimeImpl.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/JavaRuntimeImpl.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/JavaRuntimeImpl.java Sun Jan 10 09:09:45 2010
@@ -23,8 +23,9 @@
 
 import javax.tools.diagnostics.image.CorruptDataException;
 import javax.tools.diagnostics.image.DataUnavailable;
-import javax.tools.diagnostics.image.ImagePointer;
 import javax.tools.diagnostics.image.MemoryAccessException;
+import javax.tools.diagnostics.runtime.java.EntityType;
+import javax.tools.diagnostics.runtime.java.Handle;
 import javax.tools.diagnostics.runtime.java.JavaClassLoader;
 import javax.tools.diagnostics.runtime.java.JavaHeap;
 import javax.tools.diagnostics.runtime.java.JavaMethod;
@@ -35,8 +36,8 @@
 import javax.tools.diagnostics.runtime.java.JavaThread;
 import javax.tools.diagnostics.runtime.java.JavaVMInitArgs;
 
+import org.apache.kato.jvmti.javaruntime.model.JHandle;
 import org.apache.kato.jvmti.javaruntime.model.Model;
-import org.apache.kato.jvmti.javaruntime.model.SimpleImagePointer;
 import org.apache.kato.jvmti.reader.CJVMTIBinReader;
 import org.apache.kato.jvmti.reader.CLogger;
 
@@ -74,10 +75,6 @@
 		return model.getJavaClassLoader();
 	}
 
-	@Override
-	public ImagePointer getJavaVM() throws CorruptDataException {
-		return new SimpleImagePointer(0);
-	}
 
 	@Override
 	public JavaVMInitArgs getJavaVMInitArgs() throws DataUnavailable,
@@ -91,7 +88,7 @@
 	}
 
 	@Override
-	public JavaObject getObjectAtAddress(ImagePointer pointer)
+	public JavaObject getObjectByHandle(Handle pointer)
 			throws CorruptDataException, IllegalArgumentException,
 			MemoryAccessException, DataUnavailable {
 		if(pointer==null) {
@@ -136,4 +133,15 @@
 		return this.source;
 	}
 
+	/* (non-Javadoc)
+	 * @see javax.tools.diagnostics.runtime.java.JavaRuntime#createHandle(java.lang.String)
+	 */
+	@Override
+	public Handle createHandle(EntityType type,long reference)
+			throws IllegalArgumentException {
+		if(type==null) throw new IllegalArgumentException("type is null");
+		return new JHandle(type,reference);
+		
+	}
+
 }

Modified: incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JClass.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JClass.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JClass.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JClass.java Sun Jan 10 09:09:45 2010
@@ -19,7 +19,8 @@
 import java.util.List;
 
 import javax.tools.diagnostics.image.CorruptDataException;
-import javax.tools.diagnostics.image.ImagePointer;
+import javax.tools.diagnostics.runtime.java.EntityType;
+import javax.tools.diagnostics.runtime.java.Handle;
 import javax.tools.diagnostics.runtime.java.JavaClass;
 import javax.tools.diagnostics.runtime.java.JavaClassLoader;
 import javax.tools.diagnostics.runtime.java.JavaMethod;
@@ -180,8 +181,8 @@
 	}
 
 	@Override
-	public ImagePointer getID() {
-		return new SimpleImagePointer(classid);
+	public Handle getID() {
+		return new JHandle(EntityType.javaclass,classid);
 	}
 
 	@Override

Added: incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JHandle.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JHandle.java?rev=897602&view=auto
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JHandle.java (added)
+++ incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JHandle.java Sun Jan 10 09:09:45 2010
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * 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.
+ ******************************************************************************/
+package org.apache.kato.jvmti.javaruntime.model;
+
+import javax.tools.diagnostics.runtime.java.EntityType;
+import javax.tools.diagnostics.runtime.java.Handle;
+
+/**
+ * @author spoole
+ *
+ */
+public class JHandle implements Handle {
+
+	private long handle=0;
+	private EntityType type=null;
+	
+	public JHandle(EntityType type,long handle) {
+		this.handle=handle;
+		this.type=type;
+	}
+	/* (non-Javadoc)
+	 * @see javax.tools.diagnostics.runtime.java.Handle#getAddress()
+	 */
+	@Override
+	public long getAddress() {
+		return handle;
+	}
+	/* (non-Javadoc)
+	 * @see javax.tools.diagnostics.runtime.java.Handle#getType()
+	 */
+	@Override
+	public EntityType getType() {
+		return type;
+	}
+
+}

Modified: incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JHeap.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JHeap.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JHeap.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JHeap.java Sun Jan 10 09:09:45 2010
@@ -13,10 +13,8 @@
  ******************************************************************************/
 package org.apache.kato.jvmti.javaruntime.model;
 
-import java.util.Collections;
 import java.util.List;
 
-import javax.tools.diagnostics.image.ImageSection;
 import javax.tools.diagnostics.runtime.java.JavaHeap;
 import javax.tools.diagnostics.runtime.java.JavaObject;
 
@@ -47,12 +45,6 @@
 		return model.getObjects();
 	}
 
-	/**
-	 * Returns empty list as we have no image sections to report. 
-	 */
-	@Override
-	public List<ImageSection> getSections() {
-		return Collections.emptyList();
-	}
+	
 
 }

Modified: incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JLocation.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JLocation.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JLocation.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JLocation.java Sun Jan 10 09:09:45 2010
@@ -17,6 +17,7 @@
 import javax.tools.diagnostics.image.CorruptDataException;
 import javax.tools.diagnostics.image.DataUnavailable;
 import javax.tools.diagnostics.image.ImagePointer;
+import javax.tools.diagnostics.runtime.java.Handle;
 import javax.tools.diagnostics.runtime.java.JavaLocation;
 import javax.tools.diagnostics.runtime.java.JavaMethod;
 
@@ -25,18 +26,15 @@
 	public String filename=null;
 	public int linenumber=0;
 	private int compilationLevel = 0;
-	private ImagePointer p;
+	private long address=-1;
 	public JLocation() {
 		
 	}
 	
-	@Override
-	public ImagePointer getAddress() throws CorruptDataException {
-		return p;
-	}
+	
 	
 	public void setAddress(long addr){
-		p = new SimpleImagePointer(addr);
+		address=addr;
 	}
 
 	@Override
@@ -63,5 +61,19 @@
 	public JavaMethod getMethod() throws CorruptDataException {
 		return method;
 	}
+
+
+
+	/* (non-Javadoc)
+	 * @see javax.tools.diagnostics.runtime.java.JavaLocation#getAddress()
+	 */
+	@Override
+	public long getAddress() {
+		return address;
+	}
+
+
+
+	
 	
 }
\ No newline at end of file

Modified: incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JMethod.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JMethod.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JMethod.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JMethod.java Sun Jan 10 09:09:45 2010
@@ -85,10 +85,7 @@
 		return Collections.emptyList();
 	}
 
-	@Override
-	public List<ImageSection> getSections() {
-		return Collections.emptyList();
-	}
+	
 
 	@Override
 	public JavaClass getDeclaringClass() throws CorruptDataException,
@@ -126,12 +123,11 @@
 		}
 		for (JLocalVariableTableEntry jlvte: localVars){
 			if (jlvte.getSlot() == slot){
-				try {
-					if (jlvte.start+jlvte.length >= loc.getAddress().getAddress() && jlvte.start <= loc.getAddress().getAddress()){
+			
+					if (jlvte.start+jlvte.length >= loc.getAddress() && jlvte.start <= loc.getAddress()){
 						return jlvte;
 					}
-				} catch (CorruptDataException e) {
-				}
+			
 			}
 		}
 		for (JLocalVariableTableEntry jlvte: localVars){

Modified: incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JMonitor.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JMonitor.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JMonitor.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JMonitor.java Sun Jan 10 09:09:45 2010
@@ -18,7 +18,8 @@
 import java.util.List;
 
 import javax.tools.diagnostics.image.CorruptDataException;
-import javax.tools.diagnostics.image.ImagePointer;
+import javax.tools.diagnostics.runtime.java.EntityType;
+import javax.tools.diagnostics.runtime.java.Handle;
 import javax.tools.diagnostics.runtime.java.JavaMonitor;
 import javax.tools.diagnostics.runtime.java.JavaObject;
 import javax.tools.diagnostics.runtime.java.JavaThread;
@@ -58,9 +59,9 @@
 	}
 
 	@Override
-	public ImagePointer getID() {
+	public Handle getID() {
 		// Possible issue
-		return new SimpleImagePointer(0);
+		return new JHandle(EntityType.monitor,id);
 	}
 
 	@Override

Modified: incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JObject.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JObject.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JObject.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JObject.java Sun Jan 10 09:09:45 2010
@@ -19,15 +19,14 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.concurrent.CancellationException;
 import java.util.logging.Level;
 
-import javax.tools.diagnostics.image.CorruptData;
 import javax.tools.diagnostics.image.CorruptDataException;
 import javax.tools.diagnostics.image.DataUnavailable;
-import javax.tools.diagnostics.image.ImagePointer;
 import javax.tools.diagnostics.image.ImageSection;
 import javax.tools.diagnostics.image.MemoryAccessException;
+import javax.tools.diagnostics.runtime.java.EntityType;
+import javax.tools.diagnostics.runtime.java.Handle;
 import javax.tools.diagnostics.runtime.java.JavaClass;
 import javax.tools.diagnostics.runtime.java.JavaHeap;
 import javax.tools.diagnostics.runtime.java.JavaObject;
@@ -376,8 +375,8 @@
 	}
 
 	@Override
-	public ImagePointer getID() {
-		return new SimpleImagePointer(objid);
+	public Handle getID() {
+		return new JHandle(EntityType.javaobject,objid);
 	}
 
 	@Override

Modified: incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JStackFrame.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JStackFrame.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JStackFrame.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JStackFrame.java Sun Jan 10 09:09:45 2010
@@ -21,6 +21,7 @@
 import javax.tools.diagnostics.image.CorruptDataException;
 import javax.tools.diagnostics.image.DataUnavailable;
 import javax.tools.diagnostics.image.ImagePointer;
+import javax.tools.diagnostics.runtime.java.Handle;
 import javax.tools.diagnostics.runtime.java.JavaLocation;
 import javax.tools.diagnostics.runtime.java.JavaReference;
 import javax.tools.diagnostics.runtime.java.JavaStackFrame;
@@ -39,11 +40,7 @@
 		stackFrameID = stackFrameIDCount;
 		stackFrameIDCount++;
 	}
-	@Override
-	public ImagePointer getBasePointer() throws CorruptDataException {
-		
-		return new SimpleImagePointer(stackFrameID);
-	}
+	
 
 	public void setLocation(JLocation loc) {
 		this.location=loc;
@@ -95,4 +92,14 @@
 		addVariable(var);
 		
 	}
+
+
+	/* (non-Javadoc)
+	 * @see javax.tools.diagnostics.runtime.java.JavaStackFrame#getID()
+	 */
+	@Override
+	public Handle getID() {
+		
+		return null;
+	}
 }

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/image/CorruptDataImpl.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/image/CorruptDataImpl.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/image/CorruptDataImpl.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/image/CorruptDataImpl.java Sun Jan 10 09:09:45 2010
@@ -16,15 +16,17 @@
 import javax.tools.diagnostics.image.CorruptData;
 import javax.tools.diagnostics.image.ImagePointer;
 
+import org.apache.kato.hprof.java.JHandle;
+
 /**
  * Our implementation of the CorruptData interface.
  * 
  */
 public class CorruptDataImpl implements CorruptData {
-	private ImagePointer address;
+	private JHandle address;
 	private String message;
 	
-	public CorruptDataImpl(ImagePointer address, String message) {
+	public CorruptDataImpl(JHandle address, String message) {
 		this.address = address;
 		this.message = message;
 	}
@@ -35,7 +37,7 @@
 	
 	@Override
 	public ImagePointer getAddress() {
-		return address;
+		return null;
 	}
 
 	/**

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/IJavaHeapInternal.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/IJavaHeapInternal.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/IJavaHeapInternal.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/IJavaHeapInternal.java Sun Jan 10 09:09:45 2010
@@ -15,7 +15,7 @@
 
 import java.util.Collection;
 
-import javax.tools.diagnostics.image.ImagePointer;
+import javax.tools.diagnostics.runtime.java.Handle;
 import javax.tools.diagnostics.runtime.java.JavaClass;
 import javax.tools.diagnostics.runtime.java.JavaHeap;
 import javax.tools.diagnostics.runtime.java.JavaObject;
@@ -43,5 +43,5 @@
 
 	abstract Collection<JavaClassLoaderImpl> getJavaClassLoaders();
 
-	abstract ImagePointer getImagePointer(long address); 
+	abstract Handle getHandle(long address); 
 }

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaClassImpl.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaClassImpl.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaClassImpl.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaClassImpl.java Sun Jan 10 09:09:45 2010
@@ -20,8 +20,8 @@
 
 import javax.tools.diagnostics.image.CorruptDataException;
 import javax.tools.diagnostics.image.DataUnavailable;
-import javax.tools.diagnostics.image.ImagePointer;
 import javax.tools.diagnostics.image.MemoryAccessException;
+import javax.tools.diagnostics.runtime.java.Handle;
 import javax.tools.diagnostics.runtime.java.JavaClass;
 import javax.tools.diagnostics.runtime.java.JavaClassLoader;
 import javax.tools.diagnostics.runtime.java.JavaField;
@@ -34,7 +34,6 @@
 import org.apache.kato.hprof.datalayer.InstanceFieldEntry;
 import org.apache.kato.hprof.datalayer.StaticFieldEntry;
 import org.apache.kato.hprof.image.CorruptDataImpl;
-import org.apache.kato.hprof.image.ImagePointerImpl;
 
 /**
  * HProf implementation of JavaClass. 
@@ -718,8 +717,8 @@
 	 * @return ImagePointer
 	 */
 	@Override	
-	public ImagePointer getID() {
-		return heap.getImagePointer(javaClass.getClassObjectID());
+	public Handle getID() {
+		return heap.getHandle(javaClass.getClassObjectID());
 	}
 
 	/**

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaClassLoaderImpl.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaClassLoaderImpl.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaClassLoaderImpl.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaClassLoaderImpl.java Sun Jan 10 09:09:45 2010
@@ -104,7 +104,7 @@
 			JavaClassImpl clazz = heap.getJavaClassByID(ID);
 
 			if (clazz == null) {
-				return new CorruptDataImpl(heap.getImagePointer(ID), "Can't match class object ID to a JavaClassImpl.");
+				return new CorruptDataImpl((JHandle) heap.getHandle(ID), "Can't match class object ID to a JavaClassImpl.");
 			}
 			
 			return clazz;

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaHeapImpl.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaHeapImpl.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaHeapImpl.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaHeapImpl.java Sun Jan 10 09:09:45 2010
@@ -21,7 +21,6 @@
 
 import javax.tools.diagnostics.image.CorruptDataException;
 import javax.tools.diagnostics.image.ImageAddressSpace;
-import javax.tools.diagnostics.image.ImagePointer;
 import javax.tools.diagnostics.runtime.java.JavaClass;
 import javax.tools.diagnostics.runtime.java.JavaObject;
 
@@ -139,10 +138,7 @@
 	}
 
 	
-	@Override
-	public List getSections() {
-		return new LinkedList();
-	}
+	
 
 	/**
 	 * Retrieves an object by it's ID.
@@ -270,7 +266,7 @@
 					 name ="<invalid primitive class type "+type+">";
 			}
 			
-			clazz = primitiveClasses[type-4] = new JavaPrimitiveClassImpl(name, getImagePointer(type),
+			clazz = primitiveClasses[type-4] = new JavaPrimitiveClassImpl(name, getHandle(type),
 					this.getJavaClassLoaderByID(0)); // The system class loader is 0
 		}
 		
@@ -353,8 +349,8 @@
 	}
 
 	@Override
-	public ImagePointer getImagePointer(long address) {
-		return addressSpace.getPointer(address);
+	public JHandle getHandle(long address) {
+		return (JHandle) addressSpace.getPointer(address);
 	}
 	
 }

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaObjectArrayImpl.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaObjectArrayImpl.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaObjectArrayImpl.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaObjectArrayImpl.java Sun Jan 10 09:09:45 2010
@@ -19,8 +19,8 @@
 
 import javax.tools.diagnostics.image.CorruptDataException;
 import javax.tools.diagnostics.image.DataUnavailable;
-import javax.tools.diagnostics.image.ImagePointer;
 import javax.tools.diagnostics.image.MemoryAccessException;
+import javax.tools.diagnostics.runtime.java.Handle;
 import javax.tools.diagnostics.runtime.java.JavaClass;
 import javax.tools.diagnostics.runtime.java.JavaHeap;
 import javax.tools.diagnostics.runtime.java.JavaObject;
@@ -102,8 +102,8 @@
 	}
 
 	@Override
-	public ImagePointer getID() {
-		return heap.getImagePointer(record.getID());
+	public Handle getID() {
+		return heap.getHandle(record.getID());
 	}
 
 	@Override

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaObjectInstanceImpl.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaObjectInstanceImpl.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaObjectInstanceImpl.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaObjectInstanceImpl.java Sun Jan 10 09:09:45 2010
@@ -18,8 +18,8 @@
 
 import javax.tools.diagnostics.image.CorruptDataException;
 import javax.tools.diagnostics.image.DataUnavailable;
-import javax.tools.diagnostics.image.ImagePointer;
 import javax.tools.diagnostics.image.MemoryAccessException;
+import javax.tools.diagnostics.runtime.java.Handle;
 import javax.tools.diagnostics.runtime.java.JavaHeap;
 import javax.tools.diagnostics.runtime.java.JavaObject;
 
@@ -65,8 +65,8 @@
 	}
 
 	@Override
-	public ImagePointer getID() {		
-		return heap.getImagePointer(record.getID());
+	public Handle getID() {		
+		return heap.getHandle(record.getID());
 	}
 
 	@Override

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaPrimitiveArrayImpl.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaPrimitiveArrayImpl.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaPrimitiveArrayImpl.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaPrimitiveArrayImpl.java Sun Jan 10 09:09:45 2010
@@ -19,8 +19,8 @@
 
 import javax.tools.diagnostics.image.CorruptDataException;
 import javax.tools.diagnostics.image.DataUnavailable;
-import javax.tools.diagnostics.image.ImagePointer;
 import javax.tools.diagnostics.image.MemoryAccessException;
+import javax.tools.diagnostics.runtime.java.Handle;
 import javax.tools.diagnostics.runtime.java.JavaClass;
 import javax.tools.diagnostics.runtime.java.JavaHeap;
 import javax.tools.diagnostics.runtime.java.JavaObject;
@@ -195,8 +195,8 @@
 	}
 
 	@Override
-	public ImagePointer getID() {
-		return heap.getImagePointer(record.getID());
+	public Handle getID() {
+		return heap.getHandle(record.getID());
 	}
 
 	@Override

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaPrimitiveClassImpl.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaPrimitiveClassImpl.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaPrimitiveClassImpl.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaPrimitiveClassImpl.java Sun Jan 10 09:09:45 2010
@@ -18,6 +18,7 @@
 
 import javax.tools.diagnostics.image.CorruptDataException;
 import javax.tools.diagnostics.image.ImagePointer;
+import javax.tools.diagnostics.runtime.java.Handle;
 import javax.tools.diagnostics.runtime.java.JavaClass;
 import javax.tools.diagnostics.runtime.java.JavaClassLoader;
 import javax.tools.diagnostics.runtime.java.JavaObject;
@@ -32,10 +33,10 @@
  */
 public class JavaPrimitiveClassImpl implements JavaClass {
 	private String name;
-	private ImagePointer id;
+	private JHandle id;
 	private JavaClassLoader loader;
 	
-	public JavaPrimitiveClassImpl(String name, ImagePointer id, JavaClassLoader loader) {
+	public JavaPrimitiveClassImpl(String name, JHandle id, JavaClassLoader loader) {
 		this.name = name;
 		this.id = id;
 		this.loader = loader;
@@ -68,7 +69,7 @@
 
 	
 	@Override
-	public ImagePointer getID() {
+	public Handle getID() {
 		// Use basic type id as the id.
 		return id;
 	}

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaRuntimeImpl.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaRuntimeImpl.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaRuntimeImpl.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaRuntimeImpl.java Sun Jan 10 09:09:45 2010
@@ -24,6 +24,8 @@
 import javax.tools.diagnostics.image.ImageAddressSpace;
 import javax.tools.diagnostics.image.ImagePointer;
 import javax.tools.diagnostics.image.MemoryAccessException;
+import javax.tools.diagnostics.runtime.java.EntityType;
+import javax.tools.diagnostics.runtime.java.Handle;
 import javax.tools.diagnostics.runtime.java.JavaHeap;
 import javax.tools.diagnostics.runtime.java.JavaObject;
 import javax.tools.diagnostics.runtime.java.JavaRuntime;
@@ -88,11 +90,7 @@
 	}
 
 	
-	@Override
-	public ImagePointer getJavaVM() throws CorruptDataException {
-		
-		return new SimpleImagePointer(0);
-	}
+	
 
 	@Override
 	public JavaVMInitArgs getJavaVMInitArgs() throws DataUnavailable,
@@ -112,6 +110,7 @@
 		return new LinkedList();
 	}
 
+	
 	/**
 	 * Returns an object with a given object ID.
 	 * This is not the same as the objects address, which is unknown in HProf.
@@ -122,18 +121,18 @@
 	 * 
 	 */
 	@Override
-	public JavaObject getObjectAtAddress(ImagePointer address)
+	public JavaObject getObjectByHandle(Handle handle)
 			throws CorruptDataException, IllegalArgumentException,
 			MemoryAccessException, DataUnavailable {
 		
-		if(address==null) {
-			throw new IllegalArgumentException("address is null");	
+		if(handle==null) {
+			throw new IllegalArgumentException("handle is null");	
 		}
-		JavaObject obj = heap.getObjectByID(address.getAddress());
+		JavaObject obj = heap.getObjectByID(handle.getAddress());
 		
 		if (obj == null) {
 			throw new IllegalArgumentException("Couldn't retrieve object @"+
-					Long.toHexString(address.getAddress()));
+					Long.toHexString(handle.getAddress()));
 		}
 		
 		return obj;
@@ -192,4 +191,15 @@
 		
 		return view.getSource();
 	}
+
+	/* (non-Javadoc)
+	 * @see javax.tools.diagnostics.runtime.java.JavaRuntime#createHandle(javax.tools.diagnostics.runtime.java.EntityType, long)
+	 */
+	@Override
+	public Handle createHandle(EntityType type, long reference)
+			throws IllegalArgumentException {
+		return new JHandle(type, reference);
+	}
+
+	
 }

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaStackFrameImpl.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaStackFrameImpl.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaStackFrameImpl.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaStackFrameImpl.java Sun Jan 10 09:09:45 2010
@@ -20,6 +20,7 @@
 import javax.tools.diagnostics.image.DataUnavailable;
 import javax.tools.diagnostics.image.ImagePointer;
 import javax.tools.diagnostics.image.DiagnosticException;
+import javax.tools.diagnostics.runtime.java.Handle;
 import javax.tools.diagnostics.runtime.java.JavaClass;
 import javax.tools.diagnostics.runtime.java.JavaLocation;
 import javax.tools.diagnostics.runtime.java.JavaMethod;
@@ -42,16 +43,7 @@
 		this.heap = heap;
 	}
 	
-	/**
-	 * There is no stored frame bas pointer.
-	 * Returns frame ID instead.
-	 * 
-	 * FIXME Would like a DataUnavailable exception here.
-	 */
-	@Override
-	public ImagePointer getBasePointer() throws CorruptDataException {		
-		return heap.getImagePointer(frame.getID());
-	}
+	
 
 	@Override
 	public List getHeapRoots() {
@@ -82,11 +74,6 @@
 		}
 		
 		
-		@Override
-		public ImagePointer getAddress() throws CorruptDataException {
-			return heap.getImagePointer(frame.getID());
-		}
-
 		
 		/**
 		 * Returns 1 if the method is compiled, otherwise returns 0
@@ -137,7 +124,21 @@
 		public String toString() {
 			return "a string";
 		}
-		
+
+
+
+		/* (non-Javadoc)
+		 * @see javax.tools.diagnostics.runtime.java.JavaLocation#getAddress()
+		 */
+		@Override
+		public long getAddress() {
+			
+			return -1;
+		}
+
+
+
+	
 	}
 
 	/**
@@ -156,14 +157,7 @@
 			return new LinkedList();
 		}
 
-		/**
-		 * HProf has no compiled code sections.
-		 * @return empty Iterator
-		 */
-		@Override
-		public List getSections() {
-			return new LinkedList();
-		}
+		
 
 		@Override
 		public JavaClass getDeclaringClass() throws CorruptDataException,
@@ -242,5 +236,16 @@
 		
 		return new LinkedList();
 	}
+
+
+
+	/* (non-Javadoc)
+	 * @see javax.tools.diagnostics.runtime.java.JavaStackFrame#getID()
+	 */
+	@Override
+	public Handle getID() {
+		// TODO Auto-generated method stub
+		return null;
+	}
 	
 }

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaSyntheticPrimitiveArrayImpl.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaSyntheticPrimitiveArrayImpl.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaSyntheticPrimitiveArrayImpl.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/java/JavaSyntheticPrimitiveArrayImpl.java Sun Jan 10 09:09:45 2010
@@ -17,7 +17,7 @@
 import java.util.List;
 
 import javax.tools.diagnostics.image.CorruptDataException;
-import javax.tools.diagnostics.image.ImagePointer;
+import javax.tools.diagnostics.runtime.java.Handle;
 import javax.tools.diagnostics.runtime.java.JavaClass;
 import javax.tools.diagnostics.runtime.java.JavaClassLoader;
 import javax.tools.diagnostics.runtime.java.JavaObject;
@@ -59,7 +59,7 @@
 		return new LinkedList();
 	}
 
-	public ImagePointer getID() {
+	public Handle getID() {
 		return componentType.getID();
 	}
 

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/test/java/org/apache/kato/hprof/java/JavaHeapImplTest.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/test/java/org/apache/kato/hprof/java/JavaHeapImplTest.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/test/java/org/apache/kato/hprof/java/JavaHeapImplTest.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/test/java/org/apache/kato/hprof/java/JavaHeapImplTest.java Sun Jan 10 09:09:45 2010
@@ -17,11 +17,9 @@
 import java.util.HashMap;
 import java.util.List;
 
-import javax.tools.diagnostics.image.ImagePointer;
+import javax.tools.diagnostics.runtime.java.EntityType;
 import javax.tools.diagnostics.runtime.java.JavaObject;
 
-import org.apache.kato.hprof.image.ImagePointerImpl;
-
 /**
  * A dummy implementation of IJavaHeapInternal.
  * 
@@ -91,14 +89,10 @@
 		return null;
 	}
 
+	
 	@Override
-	public List getSections() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-	@Override
-	public ImagePointer getImagePointer(long address) {
-		return new ImagePointerImpl(address, null);
+	public JHandle getHandle(long address) {
+		return new JHandle(EntityType.javaobject,address);
 	}
 
 }

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/test/java/org/apache/kato/hprof/java/JavaPrimitiveClassImplTest.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/test/java/org/apache/kato/hprof/java/JavaPrimitiveClassImplTest.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/test/java/org/apache/kato/hprof/java/JavaPrimitiveClassImplTest.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/test/java/org/apache/kato/hprof/java/JavaPrimitiveClassImplTest.java Sun Jan 10 09:09:45 2010
@@ -15,6 +15,7 @@
 
 import java.util.Iterator;
 
+import javax.tools.diagnostics.runtime.java.EntityType;
 import javax.tools.diagnostics.runtime.java.JavaClass;
 
 import junit.framework.TestCase;
@@ -31,7 +32,7 @@
 	static int id = 10;
 	
 	public void setUp() {
-		instance = new JavaPrimitiveClassImpl(className, new ImagePointerImpl(id,null) , null);
+		instance = new JavaPrimitiveClassImpl(className, new JHandle(EntityType.javaclass,id) , null);
 	}
 	
 	public void testName() throws Exception {

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/test/java/test/apache/kato/hprof/java/TestJavaHeap.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/test/java/test/apache/kato/hprof/java/TestJavaHeap.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/test/java/test/apache/kato/hprof/java/TestJavaHeap.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/test/java/test/apache/kato/hprof/java/TestJavaHeap.java Sun Jan 10 09:09:45 2010
@@ -34,20 +34,7 @@
 		
 	}
 	
-	public void testGetSectionsReturns() throws IOException {
-		
-		JavaHeap heap=getPopulatedJavaHeap();
-		List i=heap.getSections();
-		assertNotNull(i);
-		
-	}
-	public void testGetSectionsIsEmpty() throws IOException {
-		
-		JavaHeap heap=getPopulatedJavaHeap();
-		Iterator i=heap.getSections().iterator();
-		assertFalse("expected empty iterator",i.hasNext());
-		
-	}
+	
 	
 	public void testGetObjectsReturns() throws Exception {
 		

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/test/java/test/apache/kato/hprof/java/TestJavaRuntime.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/test/java/test/apache/kato/hprof/java/TestJavaRuntime.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/test/java/test/apache/kato/hprof/java/TestJavaRuntime.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.api/src/test/java/test/apache/kato/hprof/java/TestJavaRuntime.java Sun Jan 10 09:09:45 2010
@@ -22,6 +22,8 @@
 import javax.tools.diagnostics.image.DataUnavailable;
 import javax.tools.diagnostics.image.ImagePointer;
 import javax.tools.diagnostics.image.MemoryAccessException;
+import javax.tools.diagnostics.runtime.java.EntityType;
+import javax.tools.diagnostics.runtime.java.Handle;
 import javax.tools.diagnostics.runtime.java.JavaObject;
 import javax.tools.diagnostics.runtime.java.JavaRuntime;
 import javax.tools.diagnostics.runtime.java.JavaVMInitArgs;
@@ -66,15 +68,7 @@
 		assertEquals("More than 0 monitors returned. There are none.",0,count);
 	}
 
-	public void testGetJVM() throws IOException, DataUnavailable, CorruptDataException {
-		JavaRuntime runtime=getJavaRuntime();
-
-		
-		ImagePointer pointer=(ImagePointer) runtime.getJavaVM();
-		assertNotNull(pointer);
-
-	}
-
+	
 	public void testGetVMArguments() throws CorruptDataException, IOException {
 		JavaRuntime runtime=getJavaRuntime();
 		try {
@@ -130,11 +124,7 @@
 			return null;
 		}
 
-		@Override
-		public ImagePointer getJavaVM() throws CorruptDataException {
-
-			return null;
-		}
+		
 
 		@Override
 		public JavaVMInitArgs getJavaVMInitArgs() throws DataUnavailable,
@@ -150,7 +140,7 @@
 		}
 
 		@Override
-		public JavaObject getObjectAtAddress(ImagePointer address)
+		public JavaObject getObjectByHandle(Handle handle)
 		throws CorruptDataException, IllegalArgumentException,
 		MemoryAccessException, DataUnavailable {
 
@@ -187,5 +177,18 @@
 			// TODO Auto-generated method stub
 			return null;
 		}
+
+		/* (non-Javadoc)
+		 * @see javax.tools.diagnostics.runtime.java.JavaRuntime#createHandle(javax.tools.diagnostics.runtime.java.EntityType, long)
+		 */
+		@Override
+		public Handle createHandle(EntityType type, long reference)
+				throws IllegalArgumentException {
+			// TODO Auto-generated method stub
+			return null;
+		}
+
+		
+		
 	}
 }

Modified: incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/KatoReader.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/KatoReader.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/KatoReader.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/KatoReader.java Sun Jan 10 09:09:45 2010
@@ -22,7 +22,6 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Vector;
-import java.util.logging.Level;
 
 import javax.tools.diagnostics.FactoryRegistry;
 import javax.tools.diagnostics.image.CorruptData;
@@ -33,6 +32,8 @@
 import javax.tools.diagnostics.image.ImageAddressSpace;
 import javax.tools.diagnostics.image.ImageProcess;
 import javax.tools.diagnostics.image.MemoryAccessException;
+import javax.tools.diagnostics.runtime.java.EntityType;
+import javax.tools.diagnostics.runtime.java.Handle;
 import javax.tools.diagnostics.runtime.java.JavaClass;
 import javax.tools.diagnostics.runtime.java.JavaClassLoader;
 import javax.tools.diagnostics.runtime.java.JavaField;
@@ -1892,7 +1893,7 @@
 											//Number of lines
 											addIntToVector(vctr, 1);
 											//for(int i = lowest; i <= highest; i++){
-												addLongToVector(vctr, jLocation.getAddress().getAddress()-1);
+												addLongToVector(vctr, jLocation.getAddress()-1);
 												addIntToVector(vctr, jLocation.getLineNumber());
 											//}
 											
@@ -2173,7 +2174,8 @@
 				{
 					JavaRuntime javaRT = (JavaRuntime) runTimesIt.next( );
 					try {
-						JavaObject jObject = javaRT.getObjectAtAddress(as.getPointer(objectID));
+						Handle h=javaRT.createHandle(EntityType.javaobject,objectID);
+						JavaObject jObject = javaRT.getObjectByHandle(h);
 						if (jObject != null){
 							return jObject;
 						}
@@ -2784,7 +2786,7 @@
 										if (length > 0){
 											if (currentFrame >= startFrame && currentFrame <= startFrame + length){
 												JavaStackFrame jStackFrame = (JavaStackFrame)frames.next();
-												addLongToVector(vctr, jStackFrame.getBasePointer().getAddress());
+												addLongToVector(vctr, jStackFrame.getID().getAddress());
 
 												JavaLocation jLoc = jStackFrame.getLocation();
 
@@ -2804,7 +2806,7 @@
 												addLongToVector(vctr, getMethodId(jClass.getID().getAddress(), jMethod));
 
 												//This is the current memory address.
-												addLongToVector(vctr, jLoc.getAddress().getAddress());
+												addLongToVector(vctr, jLoc.getAddress());
 												try{
 													logr.log(JDILogger.LEVEL_VERYVERBOSE, "  " + jLoc.getFilename() + "@" + jLoc.getMethod().getDeclaringClass().getName() + "{"+jLoc.getMethod().getDeclaringClass().getID().getAddress()+"}." + jLoc.getMethod().getName() + "{"+getMethodId(jClass.getID().getAddress(), jLoc.getMethod())+"}"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
 													try{
@@ -2818,7 +2820,7 @@
 										}else{
 											if (currentFrame >= startFrame){
 												JavaStackFrame jStackFrame = (JavaStackFrame)frames.next();
-												addLongToVector(vctr, jStackFrame.getBasePointer().getAddress());
+												addLongToVector(vctr, jStackFrame.getID().getAddress());
 
 												JavaLocation jLoc = jStackFrame.getLocation();
 
@@ -2839,7 +2841,7 @@
 												//Location is 8 bytes (2 ints)
 												//We pad with 4 bytes of zeros
 												try{
-													addLongToVector(vctr, jLoc.getAddress().getAddress());
+													addLongToVector(vctr, jLoc.getAddress());
 												}
 												catch(Exception exxy){
 													addLongToVector(vctr, -1);
@@ -3294,7 +3296,7 @@
 
 									while(frames.hasNext()){
 										JavaStackFrame jFrame = (JavaStackFrame)frames.next();
-										if (jFrame.getBasePointer().getAddress() == frameID){
+										if (jFrame.getID().getAddress() == frameID){
 //											vctr.add((byte)'L');
 //											addLongToVector(vctr,jFrame.getLocation().getMethod().getDeclaringClass().getID().getAddress());
 //											logr.log(JDILogger.LEVEL_VERBOSE, "  " + jFrame.getLocation().getMethod().getDeclaringClass().getID().getAddress()); //$NON-NLS-1$
@@ -3480,7 +3482,7 @@
 
 									while(frames.hasNext()){
 										JavaStackFrame jFrame = (JavaStackFrame)frames.next();
-										if (jFrame.getBasePointer().getAddress() == frameID){
+										if (jFrame.getID().getAddress() == frameID){
 											Vector<Byte> vctr = new Vector<Byte>();
 											ReplyPacket rpckt = new ReplyPacket(cpckt.getSequence(), FLAG_REPLY_PACKET, ERROR_NONE);
 											

Modified: incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/scenario142/javaruntime/TestJavaMonitor_ObjectMonitors.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/scenario142/javaruntime/TestJavaMonitor_ObjectMonitors.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/scenario142/javaruntime/TestJavaMonitor_ObjectMonitors.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/scenario142/javaruntime/TestJavaMonitor_ObjectMonitors.java Sun Jan 10 09:09:45 2010
@@ -19,7 +19,7 @@
 
 import javax.tools.diagnostics.image.CorruptData;
 import javax.tools.diagnostics.image.CorruptDataException;
-import javax.tools.diagnostics.image.ImagePointer;
+import javax.tools.diagnostics.runtime.java.Handle;
 import javax.tools.diagnostics.runtime.java.JavaClass;
 import javax.tools.diagnostics.runtime.java.JavaField;
 import javax.tools.diagnostics.runtime.java.JavaMonitor;
@@ -28,7 +28,6 @@
 import javax.tools.diagnostics.runtime.java.JavaThread;
 
 import org.apache.kato.tck.harness.TCKJavaRuntimeTestcase;
-import org.apache.kato.tck.scenario142.javaruntime.SetupJavaMonitor_ObjectMonitors;
 import org.apache.kato.tck.scenario142.javaruntime.SetupJavaMonitor_ObjectMonitors.MonitorThreadConfig;
 
 
@@ -1049,7 +1048,7 @@
 		
 		for (int i=0; i < SetupJavaMonitor_ObjectMonitors.NUM_MONITORS; i++){
 			JavaMonitor monitor=(JavaMonitor) setup.monitorConfigs[i].monitor;
-			ImagePointer id = monitor.getID();
+			Handle id = monitor.getID();
 			
 			assertNotNull("Found null monitor id for " + setup.monitorConfigs[i].id, id);
 			

Modified: incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/tests/legacy/TestCompiledMethods.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/tests/legacy/TestCompiledMethods.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/tests/legacy/TestCompiledMethods.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/tests/legacy/TestCompiledMethods.java Sun Jan 10 09:09:45 2010
@@ -46,7 +46,6 @@
 				
 			assertNotNull("Entry "+counter+":bytecode sections is null",sections);
 			
-			sections=m.getSections();
 			
 			assertNotNull("Entry "+counter+":compiled sections is null",sections);
 		

Modified: incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/tests/legacy/TestJavaHeaps.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/tests/legacy/TestJavaHeaps.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/tests/legacy/TestJavaHeaps.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/tests/legacy/TestJavaHeaps.java Sun Jan 10 09:09:45 2010
@@ -47,9 +47,6 @@
 			
 			List<JavaObject> objects=heap.getObjects();
 			assertNotNull("Entry "+counter+":objects list is null",objects);
-			
-			List<ImageSection> sections=heap.getSections();
-			assertNotNull("Entry "+counter+":image sections list is null",sections);
 					
 			
 			counter++;

Modified: incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/tests/legacy/TestJavaObjects.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/tests/legacy/TestJavaObjects.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/tests/legacy/TestJavaObjects.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/tests/legacy/TestJavaObjects.java Sun Jan 10 09:09:45 2010
@@ -20,6 +20,7 @@
 import javax.tools.diagnostics.image.DataUnavailable;
 import javax.tools.diagnostics.image.ImagePointer;
 import javax.tools.diagnostics.image.ImageSection;
+import javax.tools.diagnostics.runtime.java.Handle;
 import javax.tools.diagnostics.runtime.java.JavaClass;
 import javax.tools.diagnostics.runtime.java.JavaHeap;
 import javax.tools.diagnostics.runtime.java.JavaObject;
@@ -57,7 +58,7 @@
 				
 				// test id
 				
-				ImagePointer p = subTestID(counter, objcounter, object);
+				Handle p = subTestID(counter, objcounter, object);
 				
 				// test getSize
 				
@@ -210,9 +211,9 @@
 		}
 	}
 
-	private ImagePointer subTestID(int counter, int objcounter,
+	private Handle subTestID(int counter, int objcounter,
 			JavaObject object) {
-		ImagePointer p=object.getID();
+		Handle p=object.getID();
 		assertNotNull("Entry "+counter+"/"+objcounter+" getID is null",p);
 		return p;
 	}

Modified: incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/tests/legacy/TestJavaRuntime.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/tests/legacy/TestJavaRuntime.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/tests/legacy/TestJavaRuntime.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/tests/legacy/TestJavaRuntime.java Sun Jan 10 09:09:45 2010
@@ -92,20 +92,6 @@
 		
 	}
 
-public void testJavaVMNotNull() {
-	
-	JavaRuntime runtime=getJavaRuntime();
-	
-	
-	try {
-		ImagePointer data = runtime.getJavaVM();
-		assertNotNull(data);
-	} catch (CorruptDataException e) {
-		// allowed under spec
-	}
-	
-	
-}
 
 public void testJavaVMArgsNotNull() {
 	
@@ -139,7 +125,7 @@
 	
 	
 	try {
-		JavaObject data = runtime.getObjectAtAddress(null);
+		JavaObject data = runtime.getObjectByHandle(null);
 		fail("expected to receive an IllegalArgumentException");
 	} catch (CorruptDataException e) {
 		// allowed under spec but not expected for a null ptr

Modified: incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/ImageSectionTest.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/ImageSectionTest.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/ImageSectionTest.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/ImageSectionTest.java Sun Jan 10 09:09:45 2010
@@ -17,6 +17,7 @@
 
 import javax.tools.diagnostics.image.DataUnavailable;
 import javax.tools.diagnostics.image.ImageSection;
+import javax.tools.diagnostics.image.NativeMemoryAccess;
 import javax.tools.diagnostics.runtime.java.JavaMethod;
 
 
@@ -28,7 +29,8 @@
 	{
 		//for now we will just grab a compiled method section
 		JavaMethod method = defaultJavaMethod();
-		Iterator it = method.getSections().iterator();
+		if(method instanceof NativeMemoryAccess==false) return null;
+		Iterator it = ((NativeMemoryAccess)method).getSections().iterator();
 		assertNotNull(it);
 		assertTrue(it.hasNext());
 		return (ImageSection) it.next();

Modified: incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/JavaClassTest.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/JavaClassTest.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/JavaClassTest.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/JavaClassTest.java Sun Jan 10 09:09:45 2010
@@ -19,8 +19,8 @@
 
 import javax.tools.diagnostics.image.CorruptData;
 import javax.tools.diagnostics.image.CorruptDataException;
-import javax.tools.diagnostics.image.ImagePointer;
 import javax.tools.diagnostics.image.MemoryAccessException;
+import javax.tools.diagnostics.runtime.java.Handle;
 import javax.tools.diagnostics.runtime.java.JavaClass;
 import javax.tools.diagnostics.runtime.java.JavaClassLoader;
 import javax.tools.diagnostics.runtime.java.JavaField;
@@ -291,7 +291,7 @@
 	public void testGetID()
 	{
 		try {
-			ImagePointer id = _testClass.getID();
+			Handle id = _testClass.getID();
 			assertNotNull(id);
 			assertTrue(0 != id.getAddress());
 		} catch (Exception e) {

Modified: incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/JavaHeapTest.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/JavaHeapTest.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/JavaHeapTest.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/JavaHeapTest.java Sun Jan 10 09:09:45 2010
@@ -29,17 +29,7 @@
 		super.setUp();
 	}
 
-	/**
-	 * Test method for 'javax.tools.diagnostics.runtime.java.JavaHeap.getSections()'
-	 * 
-	 * Ensure that the heap has at least one section
-	 */
-	public void testGetSections()
-	{
-		List iter = _heap.getSections();
-		assertNotNull(iter);
-		assertFalse(iter.isEmpty());
-	}
+	
 
 	/**
 	 * Test method for 'javax.tools.diagnostics.runtime.java.JavaHeap.getName()'

Modified: incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/JavaLocationTest.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/JavaLocationTest.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/JavaLocationTest.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/JavaLocationTest.java Sun Jan 10 09:09:45 2010
@@ -39,20 +39,7 @@
 		super.setUp();
 	}
 
-	/**
-	 * Test method for 'javax.tools.diagnostics.runtime.java.JavaLocation.getAddress()'
-	 * 
-	 * Ensures that the address is non-null
-	 */
-	public void testGetAddress()
-	{
-		try {
-			ImagePointer address = _location.getAddress();
-			assertNotNull(address);
-		} catch (CorruptDataException e) {
-			//acceptable
-		}
-	}
+	
 
 	/**
 	 * Test method for 'javax.tools.diagnostics.runtime.java.JavaLocation.getLineNumber()'

Modified: incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/JavaMethodTest.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/JavaMethodTest.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/JavaMethodTest.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/JavaMethodTest.java Sun Jan 10 09:09:45 2010
@@ -47,17 +47,7 @@
 		}
 	}
 
-	/**
-	 * Test method for 'javax.tools.diagnostics.runtime.java.JavaMethod.getCompiledSections()'
-	 * 
-	 * Ensures that a non-null, non-empty iterator is returned
-	 */
-	public void testGetCompiledSections()
-	{
-		Iterator it = _method.getSections().iterator();
-		assertNotNull(it);
-		assertTrue(it.hasNext());
-	}
+	
 
 	/**
 	 * Test method for 'javax.tools.diagnostics.runtime.java.JavaMember.getModifiers()'

Modified: incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/JavaRuntimeTest.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/JavaRuntimeTest.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/JavaRuntimeTest.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/JavaRuntimeTest.java Sun Jan 10 09:09:45 2010
@@ -18,10 +18,8 @@
 import javax.tools.diagnostics.image.CorruptData;
 import javax.tools.diagnostics.image.CorruptDataException;
 import javax.tools.diagnostics.image.DataUnavailable;
-import javax.tools.diagnostics.image.ImageAddressSpace;
-import javax.tools.diagnostics.image.ImagePointer;
-import javax.tools.diagnostics.image.ImageSection;
 import javax.tools.diagnostics.image.MemoryAccessException;
+import javax.tools.diagnostics.runtime.java.Handle;
 import javax.tools.diagnostics.runtime.java.JavaHeap;
 import javax.tools.diagnostics.runtime.java.JavaMonitor;
 import javax.tools.diagnostics.runtime.java.JavaObject;
@@ -41,22 +39,7 @@
 		super.setUp();
 	}
 
-	/**
-	 * Test method for 'javax.tools.diagnostics.runtime.java.JavaRuntime.getJavaVM()'
-	 * 
-	 * Ensure that the pointer exists
-	 */
-	public void testGetJavaVM()
-	{
-		try {
-			assertNotNull(_runtime.getJavaVM());
-		} catch (CorruptDataException e) {
-			//allowed by spec
-		} catch (Exception e) {
-			//no other exceptions should be thrown so catch it as a failure instead of an error
-			fail();
-		}
-	}
+	
 
 	/**
 	 * Test method for 'javax.tools.diagnostics.runtime.java.JavaRuntime.getJavaClassLoaders()'
@@ -79,102 +62,27 @@
 	 * Test method for 'javax.tools.diagnostics.runtime.java.JavaRuntime.getetObjectAtAddress()'
 	 * 
 	 * Ensures that every object in the heap is also accessible by address,
-	 * and that addresses outside the heap or not pointing to an object start
-	 * throw the expected exceptions.
+	 * @throws DataUnavailable 
+	 * @throws MemoryAccessException 
+	 * @throws IllegalArgumentException 
+	 * @throws CorruptDataException 
+	 * 
 	 */
-	public void testGetObjectAtAddress()
+	public void testGetObjectByHandle() throws CorruptDataException, IllegalArgumentException, MemoryAccessException, DataUnavailable
 	{
 		JavaHeap heap = defaultJavaHeap();
+		
 		JavaRuntime runtime = defaultJavaRuntime();
-		ImageAddressSpace addressSpace = defaultAddressSpace();
-		ImagePointer address=null;
-		ImagePointer unalignedAddress=null;
-		Iterator heapSections = heap.getSections().iterator();
-
-
-		//determine the heap start and end address
-		long heapStartAddress = Long.MAX_VALUE;
-		long heapEndAddress = 0;
-
-		Object nextElement = null;
-
-		ImageSection currentSection = null;
-		long sectionStart = 0;
-
-		while (heapSections.hasNext()) {
-			nextElement = heapSections.next();
-			if (nextElement instanceof ImageSection) {
-				currentSection = (ImageSection) nextElement;
-				sectionStart = currentSection.getBaseAddress().getAddress();
-				if (sectionStart < heapStartAddress) {
-					heapStartAddress = sectionStart; 
-				}
-				if (sectionStart + currentSection.getSize() > heapEndAddress) {
-					heapEndAddress = sectionStart + currentSection.getSize(); 
-				}
-
-			}
-
-		}
-
-		//check that every object in the heap can be retrieved by address
-		boolean exception=false;
-		for (Iterator objects = heap.getObjects().iterator();objects.hasNext();) {
-			Object potentialObject = objects.next();
-			JavaObject object = null;
-			if (potentialObject instanceof JavaObject) {
-				object = (JavaObject)potentialObject;
-			} else {
-				continue;
-			}
-			address=(ImagePointer)object.getID();
-			try {
-				runtime.getObjectAtAddress(address).getJavaClass();
-				if (unalignedAddress == null) {
-					unalignedAddress = address.add(1);
-				}
-			} catch (Exception e) {
-				e.printStackTrace();
-				exception=true;
-				break;
-			}
-
-		}
-		assertFalse(exception);
-
-
-		// Check an address BEFORE the start of the heap. For some JVMs, off-heap objects are supported
-		exception=false;
-		try {
-			long addr1 = ((heapStartAddress-1000) & (Long.MAX_VALUE-7L));
-			runtime.getObjectAtAddress(addressSpace.getPointer(addr1));
-		} catch (IllegalArgumentException e) {
-            e.printStackTrace();
-			exception=true;
-		} catch (Exception e) {
-		}
-		assertFalse(exception);
-
-		// Check an address AFTER the first object but not aligned with an object boundary. 
-		// unalignedAddress is expected to throw a IllegalArgumentException
 		
-		exception=false;
-		try {
-			runtime.getObjectAtAddress(unalignedAddress);
-		} catch (IllegalArgumentException e) {
-		// IllegalArgumentException is the expected behaviour
-		} catch (CorruptDataException e) {
-			exception=true;
-			e.printStackTrace();
-		} catch (MemoryAccessException e) {
-			exception=true;
-			e.printStackTrace();
-		} catch (DataUnavailable e) {
-			exception=true;
-			e.printStackTrace();
+		for(JavaObject obj: heap.getObjects()) {
+			
+			Handle handle=obj.getID();
+			JavaObject fetched=runtime.getObjectByHandle(handle);
+			assertTrue(obj.equals(fetched));
+			
 		}
-		assertFalse(exception);
-
+ 			
+	
 	}
 
 

Modified: incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/JavaStackFrameTest.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/JavaStackFrameTest.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/JavaStackFrameTest.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tests/junit/JavaStackFrameTest.java Sun Jan 10 09:09:45 2010
@@ -41,19 +41,7 @@
 		super.setUp();
 	}
 
-	/**
-	 * Test method for 'javax.tools.diagnostics.runtime.java.JavaStackFrame.getBasePointer()'
-	 * 
-	 * Ensures that a non-null base pointer is returned
-	 */
-	public void testGetBasePointer()
-	{
-		try {
-			assertNotNull(_frame.getBasePointer());
-		} catch (CorruptDataException e) {
-			assertTrue(false);
-		}
-	}
+	
 
 	/**
 	 * Test method for 'javax.tools.diagnostics.runtime.java.JavaStackFrame.getLocation()'

Modified: incubator/kato/trunk/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/WhatisCommand.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/WhatisCommand.java?rev=897602&r1=897601&r2=897602&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/WhatisCommand.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/WhatisCommand.java Sun Jan 10 09:09:45 2010
@@ -21,6 +21,7 @@
 import javax.tools.diagnostics.image.DataUnavailable;
 import javax.tools.diagnostics.image.Image;
 import javax.tools.diagnostics.image.ImageSection;
+import javax.tools.diagnostics.image.NativeMemoryAccess;
 import javax.tools.diagnostics.runtime.ManagedRuntime;
 import javax.tools.diagnostics.runtime.java.JavaClass;
 import javax.tools.diagnostics.runtime.java.JavaHeap;
@@ -97,14 +98,15 @@
 		}
 	}
 	
-	private void findInHeap(JavaHeap jh, long address)
+	private void findInHeap(JavaHeap heap, long address)
 	{
 		//TODO: checkWithinValidMemRange(sb, ...);
-		
+		if(heap instanceof NativeMemoryAccess==false) return;
+		NativeMemoryAccess jh=(NativeMemoryAccess) heap;
 		if (isWithinImageSections(jh.getSections().iterator(), null, false, address)){
 			//if it's start or within the range of an object
-			if (!isStartOfObj(jh.getObjects().iterator(), address)){
-				if (!isWithinObjectRange(jh.getObjects().iterator(), address)){
+			if (!isStartOfObj(heap.getObjects().iterator(), address)){
+				if (!isWithinObjectRange(heap.getObjects().iterator(), address)){
 					out.print("\t\t0x" + Long.toHexString(address) + " is orphaned on the heap.\n");
 				}
 			}
@@ -113,10 +115,10 @@
 			out.print("\t\t0x" + Long.toHexString(address) + " is not within this heap.\n");
 			//TODO : function to indicate 16 or 32 bit 
 			long bound = 12; //bounds default to 16 for 32 bit system.
-			checkClassInRange(jh.getObjects().iterator(), bound, address);
+			checkClassInRange(heap.getObjects().iterator(), bound, address);
 		}
 		
-		checkMethodInRange(jh.getObjects().iterator(), address);
+		checkMethodInRange(heap.getObjects().iterator(), address);
 	}
 	
 	
@@ -135,9 +137,13 @@
 			while(methods.hasNext()){
 				JavaMethod jMethod = (JavaMethod)methods.next();
 				Iterator bytecodeSections = jMethod.getBytecodeSections().iterator();
-				Iterator compiledSections = jMethod.getSections().iterator();
 				isWithinImageSections(bytecodeSections, jMethod, false, address);
-				isWithinImageSections(compiledSections, jMethod, true, address);
+				
+				if(jMethod instanceof NativeMemoryAccess) {
+					NativeMemoryAccess nma=(NativeMemoryAccess) jMethod;
+					Iterator compiledSections = nma.getSections().iterator();
+					isWithinImageSections(compiledSections, jMethod, true, address);
+				}
 			}
 		}
 	}



Mime
View raw message