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 cc...@apache.org on 2009/03/16 16:41:14 UTC

svn commit: r754939 [1/2] - in /incubator/kato/trunk/import/org.apache.kato.api: ./ .settings/ META-INF/ schema/ src/ src/com/ src/com/ibm/ src/com/ibm/dtfj/ src/com/ibm/dtfj/image/ src/com/ibm/dtfj/java/ src/com/ibm/dtfj/runtime/ testsrc/ testsrc/test...

Author: ccristal
Date: Mon Mar 16 16:41:12 2009
New Revision: 754939

URL: http://svn.apache.org/viewvc?rev=754939&view=rev
Log:
Initial code contribution from IBM.

Added:
    incubator/kato/trunk/import/org.apache.kato.api/
    incubator/kato/trunk/import/org.apache.kato.api/.classpath
    incubator/kato/trunk/import/org.apache.kato.api/.cvsignore
    incubator/kato/trunk/import/org.apache.kato.api/.project
    incubator/kato/trunk/import/org.apache.kato.api/.settings/
    incubator/kato/trunk/import/org.apache.kato.api/.settings/org.eclipse.core.resources.prefs
    incubator/kato/trunk/import/org.apache.kato.api/.settings/org.eclipse.jdt.core.prefs
    incubator/kato/trunk/import/org.apache.kato.api/META-INF/
    incubator/kato/trunk/import/org.apache.kato.api/META-INF/MANIFEST.MF
    incubator/kato/trunk/import/org.apache.kato.api/build.properties
    incubator/kato/trunk/import/org.apache.kato.api/build.xml
    incubator/kato/trunk/import/org.apache.kato.api/plugin.xml
    incubator/kato/trunk/import/org.apache.kato.api/schema/
    incubator/kato/trunk/import/org.apache.kato.api/schema/com.ibm.dtfj.exsd
    incubator/kato/trunk/import/org.apache.kato.api/src/
    incubator/kato/trunk/import/org.apache.kato.api/src/com/
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/CorruptData.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/CorruptDataException.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/DTFJException.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/DataUnavailable.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/Image.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageAddressSpace.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageFactory.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageModule.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImagePointer.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageProcess.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageRegister.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageSection.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageStackFrame.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageSymbol.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageThread.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/MemoryAccessException.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/java/
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/java/JavaClass.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/java/JavaClassLoader.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/java/JavaField.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/java/JavaHeap.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/java/JavaLocation.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/java/JavaMember.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/java/JavaMethod.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/java/JavaMonitor.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/java/JavaObject.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/java/JavaReference.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/java/JavaRuntime.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/java/JavaStackFrame.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/java/JavaThread.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/java/JavaVMInitArgs.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/java/JavaVMOption.java
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/runtime/
    incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/runtime/ManagedRuntime.java
    incubator/kato/trunk/import/org.apache.kato.api/testsrc/
    incubator/kato/trunk/import/org.apache.kato.api/testsrc/test/
    incubator/kato/trunk/import/org.apache.kato.api/testsrc/test/ibm/
    incubator/kato/trunk/import/org.apache.kato.api/testsrc/test/ibm/dtfj/
    incubator/kato/trunk/import/org.apache.kato.api/testsrc/test/ibm/dtfj/image/
    incubator/kato/trunk/import/org.apache.kato.api/testsrc/test/ibm/dtfj/image/TestCorruptDataException.java
    incubator/kato/trunk/import/org.apache.kato.api/testsrc/test/ibm/dtfj/image/TestImage.java

Added: incubator/kato/trunk/import/org.apache.kato.api/.classpath
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/import/org.apache.kato.api/.classpath?rev=754939&view=auto
==============================================================================
--- incubator/kato/trunk/import/org.apache.kato.api/.classpath (added)
+++ incubator/kato/trunk/import/org.apache.kato.api/.classpath Mon Mar 16 16:41:12 2009
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="testsrc"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/sun142"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Added: incubator/kato/trunk/import/org.apache.kato.api/.cvsignore
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/import/org.apache.kato.api/.cvsignore?rev=754939&view=auto
==============================================================================
--- incubator/kato/trunk/import/org.apache.kato.api/.cvsignore (added)
+++ incubator/kato/trunk/import/org.apache.kato.api/.cvsignore Mon Mar 16 16:41:12 2009
@@ -0,0 +1 @@
+bin

Added: incubator/kato/trunk/import/org.apache.kato.api/.project
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/import/org.apache.kato.api/.project?rev=754939&view=auto
==============================================================================
--- incubator/kato/trunk/import/org.apache.kato.api/.project (added)
+++ incubator/kato/trunk/import/org.apache.kato.api/.project Mon Mar 16 16:41:12 2009
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.apache.kato.api</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: incubator/kato/trunk/import/org.apache.kato.api/.settings/org.eclipse.core.resources.prefs
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/import/org.apache.kato.api/.settings/org.eclipse.core.resources.prefs?rev=754939&view=auto
==============================================================================
--- incubator/kato/trunk/import/org.apache.kato.api/.settings/org.eclipse.core.resources.prefs (added)
+++ incubator/kato/trunk/import/org.apache.kato.api/.settings/org.eclipse.core.resources.prefs Mon Mar 16 16:41:12 2009
@@ -0,0 +1,5 @@
+#Fri Jan 30 14:26:56 GMT 2009
+eclipse.preferences.version=1
+encoding/build.properties=ISO-8859-1
+encoding/build.xml=UTF-8
+encoding/plugin.xml=UTF-8

Added: incubator/kato/trunk/import/org.apache.kato.api/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/import/org.apache.kato.api/.settings/org.eclipse.jdt.core.prefs?rev=754939&view=auto
==============================================================================
--- incubator/kato/trunk/import/org.apache.kato.api/.settings/org.eclipse.jdt.core.prefs (added)
+++ incubator/kato/trunk/import/org.apache.kato.api/.settings/org.eclipse.jdt.core.prefs Mon Mar 16 16:41:12 2009
@@ -0,0 +1,7 @@
+#Wed Sep 24 20:21:18 BST 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.source=1.3

Added: incubator/kato/trunk/import/org.apache.kato.api/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/import/org.apache.kato.api/META-INF/MANIFEST.MF?rev=754939&view=auto
==============================================================================
--- incubator/kato/trunk/import/org.apache.kato.api/META-INF/MANIFEST.MF (added)
+++ incubator/kato/trunk/import/org.apache.kato.api/META-INF/MANIFEST.MF Mon Mar 16 16:41:12 2009
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: DTFJ API Plug-in
+Bundle-SymbolicName: org.apache.kato.api;singleton:=true
+Bundle-Version: 1.3.0.qualifier
+Bundle-Vendor: IBM
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Export-Package: com.ibm.dtfj.image,
+ com.ibm.dtfj.java,
+ com.ibm.dtfj.runtime
+
+Name: com/ibm/dtfj/image/
+Specification-Title: Diagnostic Tool Framework for Java
+Specification-Version: 1.3
+Specification-Vendor: IBM
+Implementation-Title: @TITLE@
+Implementation-Version: @VERSION@
+Implementation-Vendor: IBM
+dummy: dummy
+Require-Bundle: org.junit

Added: incubator/kato/trunk/import/org.apache.kato.api/build.properties
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/import/org.apache.kato.api/build.properties?rev=754939&view=auto
==============================================================================
--- incubator/kato/trunk/import/org.apache.kato.api/build.properties (added)
+++ incubator/kato/trunk/import/org.apache.kato.api/build.properties Mon Mar 16 16:41:12 2009
@@ -0,0 +1,27 @@
+#-------------------------------------------------------------------------------
+# 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.
+#-------------------------------------------------------------------------------
+workspace=..
+builder=../builder.dtfj
+project=com.ibm.dtfj.api
+src=./src
+bin=./bin
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml,\
+               schema/
+
+javacSource=1.4
+javacTarget=1.4

Added: incubator/kato/trunk/import/org.apache.kato.api/build.xml
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/import/org.apache.kato.api/build.xml?rev=754939&view=auto
==============================================================================
--- incubator/kato/trunk/import/org.apache.kato.api/build.xml (added)
+++ incubator/kato/trunk/import/org.apache.kato.api/build.xml Mon Mar 16 16:41:12 2009
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<!-- ======================================================================                                                  
+
+	 DTFJ API    
+                                                                     
+     ====================================================================== -->
+<project name="project" default="default">
+
+	<tstamp/>
+	
+	<property file="./build.properties" />
+	<property file="${builder}/build.properties" />
+
+	<!-- ================================= 
+          target: default              
+         ================================= -->
+
+	<target name="default">
+		<antcall target="clean" />
+		<antcall target="compile" />
+		
+		<antcall target="javadoc" />
+		<antcall target="jar" />
+
+
+	</target>
+
+	<!-- remove compiled classes, jars etc-->
+
+	<target name="clean">
+		<delete dir="${bin}" />
+		<delete dir="${dist}" />
+		<delete dir="${junit.output}" />
+		<delete dir="${javadoc.results}" />
+		
+	</target>
+
+	<!-- compile -->
+
+	<target name="compile">
+		
+		<mkdir dir="${bin}" />
+		
+		<javac srcdir="${src}" debug="on" destdir="${bin}" source="${srclevel}" target="${srclevel}" />
+		<javac srcdir="${testsrc}" debug="on" destdir="${bin}" source="${srclevel}" target="${srclevel}" >
+			<classpath>
+				<path location="${junit.path}" />
+			</classpath>
+		</javac>
+		<copy todir="${bin}/META-INF" file="META-INF/MANIFEST.MF">
+			<filterset>
+		      <filter token="TITLE" value="IBM DTFJ ${buildname} built ${DSTAMP}:${TSTAMP}"/>
+			  <filter token="VERSION" value="${build.number}"/>
+		    </filterset>
+
+		</copy>
+	</target>
+
+	<target name="test" unless="no.test">
+		
+		<mkdir dir="${junit.output}" />
+		
+		<junit>
+			<classpath>
+				<path location="${junit.path}" />
+				<path location="${bin}" />
+			</classpath>
+
+			<formatter type="plain" />
+			<formatter type="xml" />
+
+			<batchtest fork="yes" todir="${junit.output}">
+				<fileset dir="${testsrc}">
+					<include name="**/*Test*.java" />
+					<exclude name="**/AllTests.java" />
+				</fileset>
+			</batchtest>
+
+		</junit>
+	</target>
+
+	<target name="jar">
+		<mkdir dir="${dist}" />
+		
+		<jar jarfile="${jarfile}" filesonly="true" manifest="${bin}/META-INF/MANIFEST.MF">
+			<fileset dir="${bin}">
+				<exclude name="test**/*.class" />
+			</fileset>
+		</jar>
+		<jar jarfile="${srcjarfile}" filesonly="true">
+			<fileset dir="${src}">
+				<include name="**/*.java" />
+			</fileset>
+		</jar>
+	</target>
+
+
+
+
+	<target name="javadoc" unless="no.javadoc">
+		<mkdir dir="${javadoc.results}" />
+		<javadoc packagenames="com.ibm.dtfj.*" verbose="false" sourcepath="${src}" defaultexcludes="yes" destdir="${javadoc.results}" author="true" version="true" use="true" failonerror="true"/>
+	</target>
+
+
+</project>

Added: incubator/kato/trunk/import/org.apache.kato.api/plugin.xml
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/import/org.apache.kato.api/plugin.xml?rev=754939&view=auto
==============================================================================
--- incubator/kato/trunk/import/org.apache.kato.api/plugin.xml (added)
+++ incubator/kato/trunk/import/org.apache.kato.api/plugin.xml Mon Mar 16 16:41:12 2009
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<?eclipse version="3.3"?>
+<plugin>
+   <extension-point id="imagefactory" name="DTFJ API" schema="schema/com.ibm.dtfj.exsd"/>
+</plugin>

Added: incubator/kato/trunk/import/org.apache.kato.api/schema/com.ibm.dtfj.exsd
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/import/org.apache.kato.api/schema/com.ibm.dtfj.exsd?rev=754939&view=auto
==============================================================================
--- incubator/kato/trunk/import/org.apache.kato.api/schema/com.ibm.dtfj.exsd (added)
+++ incubator/kato/trunk/import/org.apache.kato.api/schema/com.ibm.dtfj.exsd Mon Mar 16 16:41:12 2009
@@ -0,0 +1,300 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+  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.
+-->
+<!-- Schema file written by PDE -->
+<schema targetNamespace="com.ibm.dtfj.api">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="com.ibm.dtfj.api" id="imagefactory" name="DTFJ Image Factory"/>
+      </appInfo>
+      <documentation>
+         The Diagnostic Tooling For Java image factory.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <complexType>
+         <sequence minOccurs="1" maxOccurs="unbounded">
+            <element ref="factory"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="factory">
+      <annotation>
+         <appInfo>
+            <meta.element labelAttribute="label"/>
+         </appInfo>
+         <documentation>
+            Details of how to get hold of and use the ImageFactory for this DTFJ implementation.
+         </documentation>
+      </annotation>
+      <complexType>
+         <sequence minOccurs="1" maxOccurs="unbounded">
+            <element ref="content-types"/>
+         </sequence>
+         <attribute name="label" type="string" use="required">
+            <annotation>
+               <documentation>
+                  A readable description of this DTFJ implementation.
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="action" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The name of the ImageFactory class.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn=":com.ibm.dtfj.image.ImageFactory"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  An identifier used to refer to this factory.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="content-types">
+      <annotation>
+         <appInfo>
+            <meta.element labelAttribute="name" translatable="true"/>
+         </appInfo>
+         <documentation>
+            A set of one or two files which the Image Factory can make a DTFJ image from.
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="name" type="string" use="required">
+            <annotation>
+               <documentation>
+                  A name for this pair of files.
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="dump-type" type="string">
+            <annotation>
+               <documentation>
+                  The string is a org.eclipse.core.contenttype.contentTypes content-type ID. It describes the file which is the first or only parameter of ImageFactory.getImage(File f) or ImageFactory.getImage(File f1, File f2). See &lt;a href=&quot;http://www.eclipse.org/eclipse/platform-core/documents/content_types.html&quot;&gt;&apos;A central content type catalog for Eclipse&apos;&lt;/a&gt; for more details.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="meta-type" type="string">
+            <annotation>
+               <documentation>
+                  The string is a org.eclipse.core.contenttype.contentTypes content-type ID. It describes the file which is the second parameter of ImageFactory.getImage(File f1, File f2). See &lt;a href=&quot;http://www.eclipse.org/eclipse/platform-core/documents/content_types.html&quot;&gt;&apos;A central content type catalog for Eclipse&apos;&lt;/a&gt; for more details.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         &lt;code&gt;
+&lt;pre&gt;
+String dumpfile, metaFile;
+
+File file1 = new File(file);
+File file2 = new File(metaFile);
+
+FileInputStream is1 = null;
+IContentType ct0;
+try {
+ is1 = new FileInputStream(file1);
+ ct0 = Platform.getContentTypeManager().findContentTypeFor(is1, name);        
+} finally {
+ if (is1 != null) is1.close();
+}
+
+IExtensionPoint point = reg.getExtensionPoint(&quot;com.ibm.dtfj.api&quot;,&quot;imagefactory&quot;);
+
+  if (point != null) {
+   for (IExtension ex : point.getExtensions()) {
+    for (IConfigurationElement el: ex.getConfigurationElements()) {
+     if (el.getName().equals(&quot;factory&quot;)) {
+      ImageFactory fact = (ImageFactory)el.createExecutableExtension(&quot;action&quot;);
+      
+      for (IConfigurationElement el2 :el.getChildren()) {
+       if (el2.getName().equals(&quot;content-types&quot;)) {       
+        String extId = el2.getAttribute(&quot;dump-type&quot;);
+        String metaId = el2.getAttribute(&quot;meta-type&quot;);
+                 
+        IContentType cext = Platform.getContentTypeManager().getContentType(extId);
+        IContentType cmeta = Platform.getContentTypeManager().getContentType(metaId);
+        if (ct0.isKindOf(cext) {
+           Image img = fact.getImage(dump);
+        }  
+       }
+      }
+     }
+    }
+   }   
+  }       
+&lt;/pre&gt;
+&lt;/code&gt;
+
+An example of a plug-in using this extension point is as follows:
+&lt;code&gt;
+&lt;pre&gt;
+&lt;plugin&gt;
+   &lt;extension
+         id=&quot;mydtfj1&quot;
+         name=&quot;Sample DTFJ implementation&quot;
+         point=&quot;com.ibm.dtfj.api.api&quot;&gt;
+      &lt;factory
+            id=&quot;Sample DTFJ&quot;
+            action=&quot;com.usercompany.user.MyDTFJImageFactory&quot;
+            label=&quot;Sample DTFJ from text files&quot;&gt;
+         &lt;content-types
+               dump-type=&quot;com.usercompany.file1&quot;
+               meta-type=&quot;com.usercompany.file2&quot;
+               name=&quot;Type 1&quot;&gt;
+         &lt;/content-types&gt;
+      &lt;/factory&gt;
+   &lt;/extension&gt;
+   &lt;extension
+         id=&quot;mydtfj&quot;
+         name=&quot;My company DTFJ types&quot;
+         point=&quot;org.eclipse.core.contenttype.contentTypes&quot;&gt;
+      &lt;content-type
+            base-type=&quot;com.usercompany.base&quot;
+            file-extensions=&quot;abc&quot;
+            id=&quot;com.usercompany.file1&quot;
+            name=&quot;My DTFJ binary&quot;&gt;
+            &lt;describer class=&quot;org.eclipse.core.runtime.content.BinarySignatureDescriber&quot;
+                  plugin=&quot;org.eclipse.core.runtime&quot;&gt;
+               &lt;parameter
+                     name=&quot;signature&quot;
+                     value=&quot;12 34&quot;&gt;
+               &lt;/parameter&gt;
+               &lt;parameter 
+                     name=&quot;required&quot; 
+                     value=&quot;true&quot;&gt;
+               &lt;/parameter&gt;                     
+            &lt;/describer&gt;            
+      &lt;/content-type&gt;         
+      &lt;content-type
+         base-type=&quot;com.usercompany.base.xml&quot;
+         file-extensions=&quot;myxml&quot;
+               id=&quot;com.usercompany.file2&quot;
+               name=&quot;Meta data XML&quot;
+               priority=&quot;high&quot;&gt;
+            &lt;describer 
+                  class=&quot;org.eclipse.core.runtime.content.XMLRootElementContentDescriber&quot;
+                  plugin=&quot;org.eclipse.core.runtime&quot;&gt;
+               &lt;parameter
+                     name=&quot;element&quot;
+                     value=&quot;myfirstelement&quot;&gt;
+               &lt;/parameter&gt;
+            &lt;/describer&gt;
+      &lt;/content-type&gt;
+      &lt;content-type
+               alias-for=&quot;com.ibm.dtfj.base&quot;
+               base-type=&quot;org.eclipse.core.runtime.xml&quot;
+               id=&quot;com.usercompany.base.xml&quot;
+               name=&quot;Base xml&quot;&gt;
+      &lt;/content-type&gt;
+      &lt;content-type
+               alias-for=&quot;com.ibm.dtfj.base&quot;
+               id=&quot;com.usercompany.base.xml&quot;
+               name=&quot;Base dump&quot;&gt;
+         &lt;/content-type&gt;
+  &lt;/extension&gt;                    
+&lt;/plugin&gt;
+&lt;/pre&gt;
+&lt;/code&gt;
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiInfo"/>
+      </appInfo>
+      <documentation>
+         Javadoc for DTFJ is available from the com.ibm.java.dtfj.doc plug-in. See &lt;a href =&quot;http://publib.boulder.ibm.com/infocenter/javasdk/v6r0/index.jsp?topic=/com.ibm.java.doc.diagnostics.60/html/dtfj.html&quot;&gt;Using DTFJ&lt;/a&gt; for help with using DTFJ.
+
+&lt;p&gt;The action attribute must give the name of a class which implements the &lt;code&gt;com.ibm.dtfj.ImageFactory&lt;/code&gt; interface.
+&lt;p&gt;A useful convention is to make all DTFJ content-types derived from a place holder type (or types) which is an alias-for &lt;code&gt;com.ibm.dtfj.base&lt;/code&gt;. That type is not declared by any implementation, so the content-types will be derived from the whatever the place holder type is itself derived from, for example &lt;code&gt;org.eclipse.core.runtime.xml&lt;/code&gt;. If however an application wants to refer to all DTFJ files then the application can define the &lt;code&gt;com.ibm.dtfj.base&lt;/code&gt; type which will then replace the place holder type (or types) which have an alias-for &lt;code&gt;com.ibm.dtfj.base&lt;/code&gt;. All the DTFJ files will then be be a kind of &lt;code&gt;com.ibm.dtfj.base&lt;/code&gt;.
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="implementation"/>
+      </appInfo>
+      <documentation>
+         The API definition is in the com.ibm.dtfj.api plug-in, supplied by IBM.
+&lt;p&gt;
+Different implementations of DTFJ are available as extra plug-ins.
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         © Copyright IBM Corporation 2008
+      </documentation>
+   </annotation>
+
+</schema>

Added: incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/CorruptData.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/CorruptData.java?rev=754939&view=auto
==============================================================================
--- incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/CorruptData.java (added)
+++ incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/CorruptData.java Mon Mar 16 16:41:12 2009
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * 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 com.ibm.dtfj.image;
+
+/**
+ * This class is used to indicate that corruption has been detected in the image.
+ * It may indicate corruption of the image file, or it may indicate that 
+ * inconsistencies have been detected within the image file, perhaps caused by
+ * a bug in the runtime or application.
+ * 
+ * It may be encountered in two scenarios:
+ * <ul>
+ * <li>within a CorruptDataException</li>
+ * <li>returned as an element from an Iterator</li> 
+ * </ul>
+ * 
+ * Any iterator in DTFJ may implicitly include one or more CorruptData objects
+ * within the list of objects it provides. Normal data may be found after the
+ * CorruptData object if the DTFJ implementation is able to recover from the
+ * corruption.
+ * 
+ * @see CorruptDataException
+ */
+public interface CorruptData {
+
+	/**
+	 * Provides a string which describes the corruption
+	 * 
+	 * @return a descriptive string
+	 */
+	String toString();
+	
+	/**
+	 * Return an address associated with the corruption.
+	 * 
+	 * If the corruption is not associated with an address, return null.
+	 * 
+	 * If the corruption is associated with more than one address, return
+	 * the one which best identifies the corruption.
+	 * 
+	 * @return the address of the corrupted data
+	 */
+	ImagePointer getAddress();
+	
+}

Added: incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/CorruptDataException.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/CorruptDataException.java?rev=754939&view=auto
==============================================================================
--- incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/CorruptDataException.java (added)
+++ incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/CorruptDataException.java Mon Mar 16 16:41:12 2009
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * 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 com.ibm.dtfj.image;
+
+/**
+ * Used to indicate that corruption has been detected in the image.
+ * @see CorruptData
+ */
+public class CorruptDataException extends DTFJException {
+
+	private static final long serialVersionUID = 1824138624307972457L;
+
+	private CorruptData corruptData;
+	
+	/**
+	 * Construct a new CorruptDataException for the specified corrupt data
+	 * 
+	 * @param data the corruptData
+	 */
+	public CorruptDataException(CorruptData data) {
+        super(data==null ? "" : data.toString());
+
+        if (data == null) {
+        	throw new IllegalArgumentException("data must not be null");
+        }
+        corruptData = data;
+    }
+    
+	/**
+	 * Get more info about the corrupted data
+	 * 
+	 * @return the CorruptData object
+	 */
+	public CorruptData getCorruptData() {
+    	return corruptData;
+    }
+    
+}

Added: incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/DTFJException.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/DTFJException.java?rev=754939&view=auto
==============================================================================
--- incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/DTFJException.java (added)
+++ incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/DTFJException.java Mon Mar 16 16:41:12 2009
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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 com.ibm.dtfj.image;
+
+/**
+ * This class is the superclass of all exceptions thrown by DTFJ classes
+ *
+ */
+public class DTFJException extends Exception {
+	private static final long serialVersionUID = -8031802750405644473L;
+
+	/**
+	 * Build exception with the given description
+	 * @param description
+	 */
+	public DTFJException(String description) {
+        super(description);
+    }
+    
+    /**
+     * Build exception with no description
+     */
+    public DTFJException() {
+        super();
+    }
+}

Added: incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/DataUnavailable.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/DataUnavailable.java?rev=754939&view=auto
==============================================================================
--- incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/DataUnavailable.java (added)
+++ incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/DataUnavailable.java Mon Mar 16 16:41:12 2009
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * 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 com.ibm.dtfj.image;
+
+/**
+ * This exception is used to indicate that data was requested which
+ * is not available on this system, or in this image.
+ *
+ */
+public class DataUnavailable extends DTFJException {
+
+	private static final long serialVersionUID = 2104628444818149680L;
+
+	/**
+	 * Build exception with the given description
+	 * @param description
+	 */
+	public DataUnavailable(String description) {
+		super(description);
+	}
+
+    /**
+     * Build exception with no description
+     */
+	public DataUnavailable() {
+		super();
+	}
+
+}

Added: incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/Image.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/Image.java?rev=754939&view=auto
==============================================================================
--- incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/Image.java (added)
+++ incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/Image.java Mon Mar 16 16:41:12 2009
@@ -0,0 +1,139 @@
+/*******************************************************************************
+ * 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 com.ibm.dtfj.image;
+
+import java.util.Iterator;
+
+/**
+ * This class represents an entire operating system image (e.g. a core file). 
+ * 
+ * There are methods for accessing information about the architecture 
+ * of the machine on which the image was running - hardware and 
+ * operating system. The major feature, however, is the ability to 
+ * iterate over the Address Spaces contained within the image. 
+ *
+ */
+public interface Image {
+	
+	/**
+	 * Get the set of address spaces within the image - typically one but may be more on some 
+	 * systems such as Z/OS. 
+	 * @return an Iterator which iterates over all of the address spaces
+	 * described by this Image
+	 * 
+	 * @see ImageAddressSpace
+     * @see CorruptData
+	 */
+	Iterator getAddressSpaces();
+
+	/**
+	 * Get the family name for the processor on which the image was
+	 * running.
+	 * @return the family name for the processor on which the image was
+	 * running. This corresponds to the value you would find in the
+	 * "os.arch" System property.
+	 * 
+	 * @throws DataUnavailable if this data cannot be inferred from this core type
+	 * @throws CorruptDataException if expected data cannot be read from the core
+	 */
+	String getProcessorType() throws DataUnavailable, CorruptDataException;
+	
+	/**
+	 * Get the precise model of the CPU.
+	 * @return the precise model of the CPU (note that this can be an empty string but not null).
+	 * <br>
+	 * e.g. getProcessorType() will return "x86" where getProcessorSubType() may return "Pentium IV step 4"
+	 * <p>
+	 * Note that this value is platform and implementation dependent.
+	 * @throws DataUnavailable 
+	 * @throws CorruptDataException 
+	 */
+	String getProcessorSubType() throws DataUnavailable, CorruptDataException;
+	
+	/**
+	 * Get the number of CPUs running in the system on which the image was running.
+	 * @return the number of CPUs running in the system on which the
+	 * image was running
+	 * 
+	 * @exception DataUnavailable if the information cannot be provided
+	 */
+	int getProcessorCount() throws DataUnavailable;
+	
+	/**
+	 * Get the family name for the operating system.
+	 * @return the family name for the operating system.  This should be the same value
+	 * that would be returned for the "os.name" system property
+	 * 
+	 * @throws DataUnavailable if this data cannot be inferred from this core type
+	 * @throws CorruptDataException if expected data cannot be read from the core
+	 */
+	String getSystemType() throws DataUnavailable, CorruptDataException;
+	
+	/**
+	 * Get the detailed name of the operating system.
+	 * @return the detailed name of the operating system, or an empty string
+	 * if this information is not available (null will never be returned).  This should be
+	 * the same value that would be returned for the "os.version" system property
+	 * @throws DataUnavailable 
+	 * @throws CorruptDataException 
+	 */
+	String getSystemSubType() throws DataUnavailable, CorruptDataException;
+	
+	/**
+	 * Get the amount of physical memory (in bytes) installed in the system on which
+	 * the image was running.
+	 * @return the amount of physical memory installed in the system on which
+	 * the image was running.  The return value is specified in bytes.
+	 * 
+	 * @exception DataUnavailable if the information cannot be provided
+	 */
+	long getInstalledMemory() throws DataUnavailable;
+	
+	/**
+	 * Determines when the image was created
+	 * 
+	 * @return the time in milliseconds since 1970
+	 * @throws DataUnavailable 
+	 */
+	long getCreationTime() throws DataUnavailable;
+	
+	/**
+	 * Get the host name of the system where the image was running. 
+	 * @return The host name of the system where the image was running.  This string will
+	 * be non-null and non-empty
+	 * 
+	 * @throws DataUnavailable If the image did not provide this information (would happen
+	 * if the system did not know its host name or if the image predated this feature).
+	 * @throws CorruptDataException 
+	 * 
+	 * @since 1.0
+	 */
+	public String getHostName() throws DataUnavailable, CorruptDataException;
+	
+	/**
+	 * The set of IP addresses (as InetAddresses) which the system running the image possessed. 
+	 * @return An Iterator over the IP addresses (as InetAddresses) which the system running 
+	 * the image possessed.  The iterator will be non-null (but can be empty if the host is 
+	 * known to have no IP addresses).
+	 * 
+	 * @throws DataUnavailable If the image did not provide this information (would happen
+	 * if the system failed to look them up or if the image pre-dated this feature).
+	 * 
+	 * @since 1.0
+	 * 
+	 * @see java.net.InetAddress
+	 * @see CorruptData
+	 */
+	public Iterator getIPAddresses() throws DataUnavailable;
+}

Added: incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageAddressSpace.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageAddressSpace.java?rev=754939&view=auto
==============================================================================
--- incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageAddressSpace.java (added)
+++ incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageAddressSpace.java Mon Mar 16 16:41:12 2009
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * 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.
+ ******************************************************************************/
+/*
+ * Created on Feb 27, 2005
+ */
+package com.ibm.dtfj.image;
+
+import java.util.Iterator;
+
+/**
+ * This class represents a single Address Space within the image. 
+ * On some operating systems (e.g. z/OS), there can be more than 
+ * one Address Space per core file (but generally with only one 
+ * process per ImageAddressSpace). 
+ *
+ */
+public interface ImageAddressSpace {
+
+    /**
+     * Get the process within this address space which caused the image to be created.
+     * @return the process within this address space which caused 
+     * the image to be created, if any. Return null if no individual 
+     * process triggered the creation of the image.
+     */
+    ImageProcess getCurrentProcess();
+    
+    /**
+     * Get the set of processes within the address space.
+     * @return an iterator which provides all of the processes
+     * within a given address space. In most images, there will 
+     * only be one process within an ImageAddressSpace
+     * 
+     * @see ImageProcess
+     * @see CorruptData
+     */
+    Iterator getProcesses();
+    
+    /**
+     * A factory method for creating pointers into this address space
+     * @param address the address to point to
+     * @return an ImagePointer for the specified address
+     */
+    ImagePointer getPointer(long address);
+    
+    /**
+     * Get the raw memory in the address space.
+     * 
+     * @return An iterator of all the ImageSections in the address.  Their union will be the total process address space
+     * @see ImageSection
+     */
+    Iterator getImageSections();
+}

Added: incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageFactory.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageFactory.java?rev=754939&view=auto
==============================================================================
--- incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageFactory.java (added)
+++ incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageFactory.java Mon Mar 16 16:41:12 2009
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * 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 com.ibm.dtfj.image;
+
+import java.io.File;
+import java.io.IOException;
+
+/**
+ * This interface is used for classes which can produce instances of Image
+ * implementors.
+ * 
+ * Classes which implement this interface should provide a zero argument, public
+ * constructor so that they can be created using newInstance().
+ * 
+ * e.g.
+ * 
+ * <pre>
+ * Image image;
+ * try {
+ *   Class factoryClass = Class.forName(&quot;org.example.image.ImageFactory&quot;);
+ * 	 ImageFactory factory = (ImageFactory) factoryClass.newInstance();
+ * 	 image = factory.getImage(new File(coreFileName), new File(xmlFileName));
+ * } catch (ClassNotFoundException e) {
+ * 	 System.err.println(&quot;Could not find DTFJ factory class:&quot;);
+ * 	 e.printStackTrace(System.err);
+ * } catch (IllegalAccessException e) {
+ * 	 System.err.println(&quot;Could not instantiate DTFJ factory class:&quot;);
+ * 	 e.printStackTrace(System.err);
+ * } catch (InstantiationException e) {
+ * 	 System.err.println(&quot;Could not instantiate DTFJ factory class:&quot;);
+ * 	 e.printStackTrace(System.err);
+ * } catch (IOException e) {
+ * 	 System.err.println(&quot;Could not find file required for bootstrapping:&quot;);
+ * 	 e.printStackTrace(System.err);
+ * }
+ * </pre>
+ * 
+ */
+
+public interface ImageFactory {
+	
+	/**
+	 * The major version number of the current API.
+	 * 
+	 * Note that this value will be inlined so users can reference it directly
+	 * (ie:  factory.getDTFJMajorVersion() >= ImageFactory.DTFJ_MAJOR_VERSION)
+	 */
+	public static final int DTFJ_MAJOR_VERSION = 1;
+	
+	/**
+	 * The minor version number of the current API
+	 * 
+	 * Note that this value will be inlined so users can reference it directly
+	 * (ie:  factory.getDTFJMinorVersion() >= ImageFactory.DTFJ_MINOR_VERSION)
+	 */
+	public static final int DTFJ_MINOR_VERSION = 3;
+	
+	/**
+	 * Creates a new Image object based on the contents of imageFile
+	 * 
+	 * @param imageFile a file with Image information, typically a core file
+	 * @return an instance of Image
+	 * @throws IOException
+	 */
+	Image getImage(File imageFile) throws IOException;
+
+	/**
+	 * Creates a new Image object based on the contents of imageFile and metadata
+	 * 
+	 * @param imageFile a file with Image information, typically a core file
+	 * @param metadata a file with additional Image information. This is an implementation defined file
+	 * @return an instance of Image
+	 * @throws IOException
+	 */
+	Image getImage(File imageFile, File metadata) throws IOException;
+	
+	/**
+	 * Fetch the DTFJ major version number
+	 * @return An integer corresponding to the DTFJ API major version number
+	 */
+	public int getDTFJMajorVersion();
+	
+	/**
+	 * Fetch the DTFJ minor version number
+	 * @return An integer corresponding to the DTFJ API minor version number
+	 */
+	public int getDTFJMinorVersion();
+	
+	/**
+	 * Fetch the DTFJ modification level
+	 * @return An integer corresponding to the DTFJ API modification level
+	 * @since DTFJ version 1.2
+	 */	
+	public int getDTFJModificationLevel();
+}

Added: incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageModule.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageModule.java?rev=754939&view=auto
==============================================================================
--- incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageModule.java (added)
+++ incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageModule.java Mon Mar 16 16:41:12 2009
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * 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 com.ibm.dtfj.image;
+
+import java.util.Iterator;
+import java.util.Properties;
+
+/**
+ * Represents a shared library loaded into the image, or the executable module itself
+ * 
+ */
+public interface ImageModule {
+
+    /**
+     * Get the file name of the shared library.
+     * @return the file name of the shared library
+     * 
+     * @throws CorruptDataException If the module is corrupt and the 
+     * original file cannot be determined
+     */
+    String getName() throws CorruptDataException;
+    
+    /**
+     * Get the collection of sections that make up this library.
+     * @return a collection of sections that make up this library
+     * 
+     * @see ImageSection
+     * @see CorruptData
+     */
+    Iterator getSections();
+    
+    /**
+     * Provides a collection of symbols defined by the library. This
+     * list is likely incomplete as many symbols may be private,
+     * symbols may have been stripped from the library, or symbols may
+     * not by available in the image.
+     * 
+     * @return a collection of symbols which are defined by this library.
+     * 
+     * @see ImageSymbol
+     * @see CorruptData
+     */
+    Iterator getSymbols();
+    
+    /**
+     * Get the table of properties associated with this module.
+     * @return a table of properties associated with this module.
+     * Values typically defined in this table include
+     * <ul>
+     * <li>"version" -- version information about the module</li>
+     * </ul>
+     * @throws CorruptDataException 
+     */
+    Properties getProperties() throws CorruptDataException;
+    
+}

Added: incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImagePointer.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImagePointer.java?rev=754939&view=auto
==============================================================================
--- incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImagePointer.java (added)
+++ incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImagePointer.java Mon Mar 16 16:41:12 2009
@@ -0,0 +1,139 @@
+/*******************************************************************************
+ * 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 com.ibm.dtfj.image;
+
+/**
+ * Represents an address in image memory.
+ * 
+ */
+public interface ImagePointer {
+
+    /**
+     * Get the unwrapped address, represented as a 64-bit integer.
+     * @return the unwrapped address, represented as a 64-bit integer
+     * <br>
+     * Use caution when comparing addresses, as some addresses may be
+     * negative.
+     * <br>
+     * Note that on segmented memory architectures, it may not be 
+     * possible to represent all addresses accurately as integers
+     */
+    long getAddress();
+    
+    /**
+     * Get the address space to which this pointer belongs.
+     * @return the address space to which this pointer belongs
+     */
+    ImageAddressSpace getAddressSpace();
+    
+    /**
+     * Build a new image pointer offset from this one by the given amount.
+     * @param offset
+     * @return a new ImagePointer based at getAddress() + offset
+     */
+    ImagePointer add(long offset);
+    
+    /**
+     * Is the referenced location executable ?
+     * @return true if this memory address is within an executable page
+     * @throws DataUnavailable 
+     */
+    boolean isExecutable() throws DataUnavailable;
+    
+    /**
+     * Is the referenced location read only ?
+     * @return true if write access to this memory address was disabled in the image
+     * @throws DataUnavailable 
+     */
+    boolean isReadOnly() throws DataUnavailable;
+    
+    /**
+     * Is the referenced location shared ?
+     * @return true if this memory address is shared between processes
+     * @throws DataUnavailable 
+     */
+    boolean isShared() throws DataUnavailable;
+    
+    /**
+     * Get the value at the given offset from this pointer.
+     * To determine the number of bytes to skip after this call to read the next value, use <code>ImageProcess.getPointerSize()</code>.
+     * @param index  an offset (in bytes) from the current position
+     * @return the 32 or 64-bit pointer stored at getAddress() + index 
+     * @throws MemoryAccessException if the memory cannot be read
+     * @throws CorruptDataException if the memory should be in the image, but is missing or corrupted
+     * @see    ImageProcess#getPointerSize()
+     */
+    ImagePointer getPointerAt(long index) throws MemoryAccessException, CorruptDataException;
+    
+    /**
+     * Get the value at the given offset from this pointer.
+     * @param index  an offset (in bytes) from the current position
+     * @return the 64-bit long stored at getAddress() + index 
+     * @throws MemoryAccessException if the memory cannot be read
+     * @throws CorruptDataException if the memory should be in the image, but is missing or corrupted
+     */
+    long getLongAt(long index)  throws MemoryAccessException, CorruptDataException;
+    
+    /**
+     * Get the value at the given offset from this pointer.
+     * @param index  an offset (in bytes) from the current position
+     * @return the 32-bit int stored at getAddress() + index 
+     * @throws MemoryAccessException if the memory cannot be read
+     * @throws CorruptDataException if the memory should be in the image, but is missing or corrupted
+     */
+    int getIntAt(long index) throws MemoryAccessException, CorruptDataException;
+    
+    /**
+     * Get the value at the given offset from this pointer.
+     * @param index  an offset (in bytes) from the current position
+     * @return the 16-bit short stored at getAddress() + index 
+     * @throws MemoryAccessException if the memory cannot be read
+     * @throws CorruptDataException if the memory should be in the image, but is missing or corrupted
+     */
+    short getShortAt(long index) throws MemoryAccessException, CorruptDataException;
+    
+    /**
+     * Get the value at the given offset from this pointer.
+     * @param index  an offset (in bytes) from the current position
+     * @return the 8-bit byte stored at getAddress() + index 
+     * @throws MemoryAccessException if the memory cannot be read
+     * @throws CorruptDataException if the memory should be in the image, but is missing or corrupted
+     */
+    byte getByteAt(long index) throws MemoryAccessException, CorruptDataException;
+    
+    /**
+     * Get the value at the given offset from this pointer.
+     * @param index  an offset (in bytes) from the current position
+     * @return the 32-bit float stored at getAddress() + index
+     * @throws MemoryAccessException if the memory cannot be read
+     * @throws CorruptDataException if the memory should be in the image, but is missing or corrupted
+     */
+    float getFloatAt(long index) throws MemoryAccessException, CorruptDataException;
+
+    /**
+     * Get the value at the given offset from this pointer.
+     * @param index  an offset (in bytes) from the current position
+     * @return the 64-bit double stored at getAddress() + index 
+     * @throws MemoryAccessException if the memory cannot be read
+     * @throws CorruptDataException if the memory should be in the image, but is missing or corrupted
+     */
+    double getDoubleAt(long index) throws MemoryAccessException, CorruptDataException;
+    
+	/**
+	 * @param obj
+	 * @return True obj refers to the same Image Pointer in the image
+	 */
+	public boolean equals(Object obj);
+	public int hashCode();
+}

Added: incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageProcess.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageProcess.java?rev=754939&view=auto
==============================================================================
--- incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageProcess.java (added)
+++ incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageProcess.java Mon Mar 16 16:41:12 2009
@@ -0,0 +1,155 @@
+/*******************************************************************************
+ * 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 com.ibm.dtfj.image;
+
+import java.util.Iterator;
+import java.util.Properties;
+
+/**
+ * This class represents a Process running in a given Address Space.
+ *
+ */
+public interface ImageProcess {
+
+    /**
+     * Fetch the command line for this process. This may be the exact command line
+     * the user issued, or it may be a reconstructed command line based on
+     * argv[] and argc.
+     * 
+     * @return the command line for the process
+     *
+     * @exception DataUnavailable if the information cannot be provided
+     * @throws CorruptDataException 
+     */
+    String getCommandLine() throws DataUnavailable, CorruptDataException;
+    
+    /**
+     * Get the environment variables for this process.
+     * @return the environment variables for this process
+     * 
+     * @exception DataUnavailable if the information cannot be provided
+     * @throws CorruptDataException 
+     */
+    Properties getEnvironment() throws DataUnavailable, CorruptDataException;
+    
+    /**
+     * Get the system-wide identifier for the process.
+     * @return a system-wide identifier for the process (e.g. a process id (pid) on Unix like
+     * systems)
+     * 
+   	 * @exception DataUnavailable if the information cannot be provided
+     * @throws CorruptDataException 
+     */
+    String getID() throws DataUnavailable, CorruptDataException;
+    
+    /**
+     * Get the set of shared libraries which are loaded in this process.
+     * @return an iterator to iterate over the shared libraries which are loaded in this
+     * process
+     * 
+     * @exception DataUnavailable if the information cannot be provided
+     * @throws CorruptDataException 
+     * 
+     * @see ImageModule
+     * @see CorruptData
+     */
+    Iterator getLibraries() throws DataUnavailable, CorruptDataException;
+    
+    /**
+     * Get the module representing the executable within the image.
+     * @return the module representing the executable within the image (as opposed to
+     * modules representing libraries)
+     * 
+     * @exception DataUnavailable if the information cannot be provided
+     * @throws CorruptDataException 
+     * 
+     * @see ImageModule
+     */
+    ImageModule getExecutable() throws DataUnavailable, CorruptDataException;
+    
+    /**
+     * Get the set of image threads in the image.
+     * 
+     * There is not necessarily any relationship between JavaThreads and
+     * ImageThreads. A JVM implementation may use an n:m mapping of JavaThreads to
+     * ImageThreads, and not all ImageThreads are necessarily attached.
+     * 
+     * @return an iterator to iterate over each ImageThread in the image
+     * @see ImageThread 
+     * @see CorruptData
+     */
+    Iterator getThreads();
+
+    /**
+     * Find the thread which triggered the creation of the image
+     * 
+     * @return the ImageThread which caused the image to be created, or
+     * null if the image was not created due to a specific thread
+     * @throws CorruptDataException 
+     * 
+     * @see ImageThread
+     */
+    ImageThread getCurrentThread() throws CorruptDataException;
+    
+    /**
+     * Get the set of the known ManagedRuntime environments in the image. 
+     * In a typical image, there will be only one runtime, and it will be
+     * an instance of JavaRuntime. However any user of this API should be aware
+     * that there is a possibility that other runtimes may exist in the image
+     * 
+     * @return an iterator to iterate over all of the known ManagedRuntime
+     * environments in the image. 
+     * 
+     * 
+     * @see com.ibm.dtfj.runtime.ManagedRuntime 
+     * @see com.ibm.dtfj.java.JavaRuntime
+     * @see CorruptData
+     */
+    Iterator getRuntimes();
+    
+    /**
+     * Get the OS signal number in this process which triggered the creation 
+     * of this image.
+     * 
+     * @return the OS signal number in this process which triggered the creation 
+     * of this image, or 0 if the image was not created because of a signal in this
+     * process
+     * 
+     * @exception DataUnavailable if the information cannot be provided
+     * @throws CorruptDataException 
+     */
+    int getSignalNumber() throws DataUnavailable, CorruptDataException;
+    
+    /**
+     * Get the name of the OS signal in this process which triggered the 
+     * creation of this image.
+     * @return the name of the OS signal in this process which triggered the 
+     * creation of this image, or null if the image was not created because of a 
+     * signal in this process
+     * 
+     * @exception DataUnavailable if the information cannot be provided
+     * @throws CorruptDataException 
+     */
+    String getSignalName() throws DataUnavailable, CorruptDataException;
+    
+    /**
+     * Determine the pointer size used by this process.
+     * Currently supported values are 31, 32 or 64.
+     * In the future, other pointer sizes may also be supported.
+     * 
+     * @return the size of a pointer, in bits
+     */
+    int getPointerSize();
+
+}

Added: incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageRegister.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageRegister.java?rev=754939&view=auto
==============================================================================
--- incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageRegister.java (added)
+++ incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageRegister.java Mon Mar 16 16:41:12 2009
@@ -0,0 +1,219 @@
+/*******************************************************************************
+ * 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 com.ibm.dtfj.image;
+
+/**
+ * Represents the state of a CPU or FPU register
+ */
+public interface ImageRegister {
+
+    /**
+     * Fetch the name of a register.
+     * 
+     * On some CPUs registers may have more than one conventional name. Recommended 
+     * names for some CPUs are provided below. Implementations may provide more
+     * registers than those named here.
+     * 
+     * <table cellspacing="10"><tr valign="top">
+     * 
+     * <td><table frame="border">
+     * <tr><th colspan=2>IA32</th></tr>
+     * <tr><th>Register</th><th>Type</th></tr>
+     * <tr><td>EDI</td><td>Integer</td></tr>
+     * <tr><td>ESI</td><td>Integer</td></tr>
+     * <tr><td>EAX</td><td>Integer</td></tr>
+     * <tr><td>EBX</td><td>Integer</td></tr>
+     * <tr><td>ECX</td><td>Integer</td></tr>
+     * <tr><td>EDX</td><td>Integer</td></tr>
+     * <tr><td>EIP</td><td>Integer</td></tr>
+     * <tr><td>ESP</td><td>Integer</td></tr>
+     * <tr><td>EBP</td><td>Integer</td></tr>
+     * </table></td>
+     * 
+     * <td><table frame="border">
+     * <tr><th colspan=2>AMD64</th></tr>
+     * <tr><th>Register</th><th>Type</th></tr>
+     * <tr><td>RDI</td><td>Long</td></tr>
+     * <tr><td>RSI</td><td>Long</td></tr>
+     * <tr><td>RAX</td><td>Long</td></tr>
+     * <tr><td>RBX</td><td>Long</td></tr>
+     * <tr><td>RCX</td><td>Long</td></tr>
+     * <tr><td>RDX</td><td>Long</td></tr>
+     * <tr><td>R8</td><td>Long</td></tr>
+     * <tr><td>R9</td><td>Long</td></tr>
+     * <tr><td>R10</td><td>Long</td></tr>
+     * <tr><td>R11</td><td>Long</td></tr>
+     * <tr><td>R12</td><td>Long</td></tr>
+     * <tr><td>R13</td><td>Long</td></tr>
+     * <tr><td>R14</td><td>Long</td></tr>
+     * <tr><td>R15</td><td>Long</td></tr>
+     * <tr><td>RIP</td><td>Long</td></tr>
+     * <tr><td>RSP</td><td>Long</td></tr>
+     * <tr><td>RBP</td><td>Long</td></tr>
+     * </table></td>
+     * 
+     * <td><table frame="border">
+     * <tr><th colspan=2>PowerPC 32</th></tr>
+     * <tr><th>Register</th><th>Type</th></tr>
+     * <tr><td>R0</td><td>Integer</td></tr>
+     * <tr><td>R1</td><td>Integer</td></tr>
+     * <tr><td>R2</td><td>Integer</td></tr>
+     * <tr><td>R3</td><td>Integer</td></tr>
+     * <tr><td>R4</td><td>Integer</td></tr>
+     * <tr><td>R5</td><td>Integer</td></tr>
+     * <tr><td>R6</td><td>Integer</td></tr>
+     * <tr><td>R7</td><td>Integer</td></tr>
+     * <tr><td>R8</td><td>Integer</td></tr>
+     * <tr><td>R9</td><td>Integer</td></tr>
+     * <tr><td>R10</td><td>Integer</td></tr>
+     * <tr><td>R11</td><td>Integer</td></tr>
+     * <tr><td>R12</td><td>Integer</td></tr>
+     * <tr><td>R13</td><td>Integer</td></tr>
+     * <tr><td>R14</td><td>Integer</td></tr>
+     * <tr><td>R15</td><td>Integer</td></tr>
+     * <tr><td>R16</td><td>Integer</td></tr>
+     * <tr><td>R17</td><td>Integer</td></tr>
+     * <tr><td>R18</td><td>Integer</td></tr>
+     * <tr><td>R19</td><td>Integer</td></tr>
+     * <tr><td>R20</td><td>Integer</td></tr>
+     * <tr><td>R21</td><td>Integer</td></tr>
+     * <tr><td>R22</td><td>Integer</td></tr>
+     * <tr><td>R23</td><td>Integer</td></tr>
+     * <tr><td>R24</td><td>Integer</td></tr>
+     * <tr><td>R25</td><td>Integer</td></tr>
+     * <tr><td>R26</td><td>Integer</td></tr>
+     * <tr><td>R27</td><td>Integer</td></tr>
+     * <tr><td>R28</td><td>Integer</td></tr>
+     * <tr><td>R29</td><td>Integer</td></tr>
+     * <tr><td>R30</td><td>Integer</td></tr>
+     * <tr><td>R31</td><td>Integer</td></tr>
+     * <tr><td>IAR</td><td>Integer</td></tr>
+     * <tr><td>LR</td><td>Integer</td></tr>
+     * <tr><td>MSR</td><td>Integer</td></tr>
+     * <tr><td>CTR</td><td>Integer</td></tr>
+     * <tr><td>CR</td><td>Integer</td></tr>
+     * <tr><td>FPSCR</td><td>Integer</td></tr>
+     * <tr><td>XER</td><td>Integer</td></tr>
+     * <tr><td>TID</td><td>Integer</td></tr>
+     * <tr><td>MQ</td><td>Integer</td></tr>
+     * </table></td>
+     * 
+     * <td><table frame="border">
+     * <tr><th colspan=2>PowerPC 64</th></tr>
+     * <tr><th>Register</th><th>Type</th></tr>
+     * <tr><td>R0</td><td>Long</td></tr>
+     * <tr><td>R1</td><td>Long</td></tr>
+     * <tr><td>R2</td><td>Long</td></tr>
+     * <tr><td>R3</td><td>Long</td></tr>
+     * <tr><td>R4</td><td>Long</td></tr>
+     * <tr><td>R5</td><td>Long</td></tr>
+     * <tr><td>R6</td><td>Long</td></tr>
+     * <tr><td>R7</td><td>Long</td></tr>
+     * <tr><td>R8</td><td>Long</td></tr>
+     * <tr><td>R9</td><td>Long</td></tr>
+     * <tr><td>R10</td><td>Long</td></tr>
+     * <tr><td>R11</td><td>Long</td></tr>
+     * <tr><td>R12</td><td>Long</td></tr>
+     * <tr><td>R13</td><td>Long</td></tr>
+     * <tr><td>R14</td><td>Long</td></tr>
+     * <tr><td>R15</td><td>Long</td></tr>
+     * <tr><td>R16</td><td>Long</td></tr>
+     * <tr><td>R17</td><td>Long</td></tr>
+     * <tr><td>R18</td><td>Long</td></tr>
+     * <tr><td>R19</td><td>Long</td></tr>
+     * <tr><td>R20</td><td>Long</td></tr>
+     * <tr><td>R21</td><td>Long</td></tr>
+     * <tr><td>R22</td><td>Long</td></tr>
+     * <tr><td>R23</td><td>Long</td></tr>
+     * <tr><td>R24</td><td>Long</td></tr>
+     * <tr><td>R25</td><td>Long</td></tr>
+     * <tr><td>R26</td><td>Long</td></tr>
+     * <tr><td>R27</td><td>Long</td></tr>
+     * <tr><td>R28</td><td>Long</td></tr>
+     * <tr><td>R29</td><td>Long</td></tr>
+     * <tr><td>R30</td><td>Long</td></tr>
+     * <tr><td>R31</td><td>Long</td></tr>
+     * <tr><td>IAR</td><td>Long</td></tr>
+     * <tr><td>LR</td><td>Long</td></tr>
+     * <tr><td>MSR</td><td>Long</td></tr>
+     * <tr><td>CTR</td><td>Long</td></tr>
+     * <tr><td>CR</td><td>Long</td></tr>
+     * <tr><td>FPSCR</td><td>Long</td></tr>
+     * <tr><td>XER</td><td>Long</td></tr>
+     * </table></td>
+     *
+     * <td><table frame="border">
+     * <tr><th colspan=2>z/Series 31</th></tr>
+     * <tr><th>Register</th><th>Type</th></tr>
+     * <tr><td>gpr0</td><td>Integer</td></tr>
+     * <tr><td>gpr1</td><td>Integer</td></tr>
+     * <tr><td>gpr2</td><td>Integer</td></tr>
+     * <tr><td>gpr3</td><td>Integer</td></tr>
+     * <tr><td>gpr4</td><td>Integer</td></tr>
+     * <tr><td>gpr5</td><td>Integer</td></tr>
+     * <tr><td>gpr6</td><td>Integer</td></tr>
+     * <tr><td>gpr7</td><td>Integer</td></tr>
+     * <tr><td>gpr8</td><td>Integer</td></tr>
+     * <tr><td>gpr9</td><td>Integer</td></tr>
+     * <tr><td>gpr10</td><td>Integer</td></tr>
+     * <tr><td>gpr11</td><td>Integer</td></tr>
+     * <tr><td>gpr12</td><td>Integer</td></tr>
+     * <tr><td>gpr13</td><td>Integer</td></tr>
+     * <tr><td>gpr14</td><td>Integer</td></tr>
+     * <tr><td>gpr15</td><td>Integer</td></tr>
+     * <tr><td>psw0</td><td>Integer</td></tr>
+     * <tr><td>psw1</td><td>Integer</td></tr>
+     * </table></td>
+     *
+     * <td><table frame="border">
+     * <tr><th colspan=2>z/Series 64</th></tr>
+     * <tr><th>Register</th><th>Type</th></tr>
+     * <tr><td>gpr0</td><td>Long</td></tr>
+     * <tr><td>gpr1</td><td>Long</td></tr>
+     * <tr><td>gpr2</td><td>Long</td></tr>
+     * <tr><td>gpr3</td><td>Long</td></tr>
+     * <tr><td>gpr4</td><td>Long</td></tr>
+     * <tr><td>gpr5</td><td>Long</td></tr>
+     * <tr><td>gpr6</td><td>Long</td></tr>
+     * <tr><td>gpr7</td><td>Long</td></tr>
+     * <tr><td>gpr8</td><td>Long</td></tr>
+     * <tr><td>gpr9</td><td>Long</td></tr>
+     * <tr><td>gpr10</td><td>Long</td></tr>
+     * <tr><td>gpr11</td><td>Long</td></tr>
+     * <tr><td>gpr12</td><td>Long</td></tr>
+     * <tr><td>gpr13</td><td>Long</td></tr>
+     * <tr><td>gpr14</td><td>Long</td></tr>
+     * <tr><td>gpr15</td><td>Long</td></tr>
+     * <tr><td>psw0</td><td>Long</td></tr>
+     * <tr><td>psw1</td><td>Long</td></tr>
+     * </table></td>
+     * 
+     * </tr></table>
+     * 
+     * @return the conventional name of the register
+     */
+    String getName();
+    
+    /**
+     * Get the value for the register.
+     * @return an integral or floating point type which contains
+     * the value for the register. The returned value may be an
+     * instance of any subclass of Number. For instance, on x86
+     * architectures with MMX, the XMM registers will be returned
+     * as BigInteger instances
+     * @throws CorruptDataException 
+     */
+    Number getValue() throws CorruptDataException;
+    
+}

Added: incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageSection.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageSection.java?rev=754939&view=auto
==============================================================================
--- incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageSection.java (added)
+++ incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageSection.java Mon Mar 16 16:41:12 2009
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * 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 com.ibm.dtfj.image;
+
+/**
+ * Represents a range of memory used for a specific purpose.
+ * 
+ * @see ImageModule
+ */
+public interface ImageSection {
+    
+    /**
+     * Get the lowest address of memory in this section.
+     * @return the lowest address of memory in this section
+     */
+    ImagePointer getBaseAddress();
+    
+    /**
+     * Get the size of this contiguous image section as measured in bytes.
+     * @return the size of this contiguous image section as measured in bytes
+     */
+    long getSize();
+    
+    /**
+     * Get the name of this section (e.g. ".text").
+     * @return the name of this section (e.g. ".text").  Note that sections of the image which have no specific 
+     * name will receive a name synthesised by the implementation.  This will never be null.
+     */
+    String getName();
+    
+    /**
+     * Does this section contain executable code ?
+     * @return true if this section contains executable code, false otherwise 
+     * @throws DataUnavailable 
+     */
+    boolean isExecutable() throws DataUnavailable;
+    
+    /**
+     * Is this section read-only ?
+     * @return true if write access to this section was disabled
+     * @throws DataUnavailable 
+     */
+    boolean isReadOnly() throws DataUnavailable;
+    
+    /**
+     * Is this section shared with other VMs.
+     * @return true if this section is shared between processes
+     * @throws DataUnavailable 
+     */
+    boolean isShared() throws DataUnavailable;
+    
+}

Added: incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageStackFrame.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageStackFrame.java?rev=754939&view=auto
==============================================================================
--- incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageStackFrame.java (added)
+++ incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageStackFrame.java Mon Mar 16 16:41:12 2009
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * 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 com.ibm.dtfj.image;
+
+/**
+ * Represents a native stack frame
+ */
+public interface ImageStackFrame {
+
+    /**
+     * Get the address of the current instruction within
+     * the procedure being executed.
+     * @return the address of the current instruction within
+     * the procedure being executed, or null if not available.
+     * <br>
+     * Use this address with caution, as it is provided only 
+     * as a best guess. It may not be correct, or even within
+     * readable memory
+     * @throws CorruptDataException 
+     */
+    ImagePointer getProcedureAddress() throws CorruptDataException;
+    
+    /**
+     * Get the base pointer of the stack frame.
+     * @return the base pointer of the stack frame
+     * @throws CorruptDataException 
+     */
+    ImagePointer getBasePointer() throws CorruptDataException;
+    
+    /**
+     * Returns a string describing the procedure at this stack
+     * frame. Implementations should use the following template
+     * so that procedure names are reported consistently:
+     * <p>
+     * <dl><dd><pre>libname(sourcefile)::entrypoint&#177;<!-- +/- -->offset</pre></dd></dl>
+     * <p>
+     * Any portion of the template may be omitted if it is not available 
+     * <dl>
+     * <dt>e.g.</dt>
+     * 		<dd><pre>system32(source.c)::WaitForSingleObject+14</pre></dd>
+     * 		<dd><pre>system32::WaitForSingleObject-4</pre></dd>
+     * 		<dd><pre>(source.c)::WaitForSingleObject</pre></dd>
+     * 		<dd><pre>::WaitForSingleObject+14</pre></dd>
+     * 		<dd><pre>system32+1404</pre></dd>
+     * 		<dd><pre>system32::TWindow::open(int,void*)+14</pre></dd>
+     * </dl>
+     * 
+     * @return a string naming the function executing in this
+     * stack frame.  If the name is not known for legitimate
+     * reasons, DTFJ will return a synthetic name.
+     * @throws CorruptDataException 
+     */
+    String getProcedureName() throws CorruptDataException;
+    
+}

Added: incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageSymbol.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageSymbol.java?rev=754939&view=auto
==============================================================================
--- incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageSymbol.java (added)
+++ incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageSymbol.java Mon Mar 16 16:41:12 2009
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * 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 com.ibm.dtfj.image;
+
+/**
+ * Represents a symbol defined in an ImageModule
+ *
+ */
+public interface ImageSymbol {
+
+	/**
+	 * Get the address of this symbol in the image.
+	 * @return the address of this symbol in the image
+	 */
+	ImagePointer getAddress();
+	
+	/**
+	 * Get the name of the symbol.
+	 * @return the name of the symbol
+	 */
+	String getName();
+	
+}

Added: incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageThread.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageThread.java?rev=754939&view=auto
==============================================================================
--- incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageThread.java (added)
+++ incubator/kato/trunk/import/org.apache.kato.api/src/com/ibm/dtfj/image/ImageThread.java Mon Mar 16 16:41:12 2009
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * 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 com.ibm.dtfj.image;
+
+import java.util.Iterator;
+import java.util.Properties;
+
+/**
+ * A low-level thread instance
+ */
+public interface ImageThread {
+
+    /**
+     * Fetch a unique identifier for the thread.
+     * In many operating systems, threads have more than one identifier (e.g.
+     * a thread id, a handle, a pointer to VM structures associated with the thread).
+     * In this case, one of these identifiers will be chosen as the canonical
+     * one. The other identifiers would be returned by getProperties()
+     * 
+     * @return a process-wide identifier for the thread (e.g. a tid number)
+     * @throws CorruptDataException 
+     */
+    String getID() throws CorruptDataException;
+ 
+    /**
+     * Get the set of stack frames on this thread.
+     * 
+     * @return an iterator to walk the native stack frames in order from 
+     * top-of-stack (that is, the most recent frame) to bottom-of-stack. Throws
+     * DataUnavailable if native stack frames are not available on this platform.
+     * 
+     * @throws DataUnavailable If native stack frames are not available on this platform
+     * @see ImageStackFrame
+     * @see CorruptData
+     * 
+     */
+    Iterator getStackFrames() throws DataUnavailable;
+    
+    /**
+     * Get the set of image sections which make up the stack.
+     * 
+     * @return a collection of ImageSections which make up the stack. On
+     * most platforms this consists of a single entry, but on some platforms
+     * the thread's stack may consist of non-contiguous sections
+     * 
+     * @see ImageSection
+     * @see CorruptData
+     */
+    Iterator getStackSections();
+    
+    /**
+     * Get the register contents.
+     * 
+     * @return an iterator to iterate over the state of the CPU registers
+     * when the image was created. The collection may be empty if the register 
+     * state is not available for this thread.
+     * 
+     * If the CPU supports partial registers (e.g. AH, AL, AX, EAX, RAX on
+     * AMD64), only the largest version of the register will be included
+     * 
+     * @see ImageRegister
+     */
+    Iterator getRegisters();
+    
+    /**
+     * Get the OS-specific properties for this thread.
+     * @return a table of OS-specific properties for this thread.
+     * Values which are commonly available include
+     * <ul>
+     * <li>"priority" -- the priority of the thread</li>
+     * <li>"policy" -- the scheduling policy of the thread</li>
+     * </ul> 
+     */
+    Properties getProperties();
+}