harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r655779 [1/2] - in /harmony/standard/site: docs/ docs/subcomponents/drlvm/ xdocs/ xdocs/subcomponents/drlvm/
Date Tue, 13 May 2008 08:32:12 GMT
Author: gshimansky
Date: Tue May 13 01:32:11 2008
New Revision: 655779

URL: http://svn.apache.org/viewvc?rev=655779&view=rev
Log:
Applied patch from HARMONY-5812
[site][doc] NCAI site documentation


Added:
    harmony/standard/site/docs/subcomponents/drlvm/NCAI.html   (with props)
    harmony/standard/site/docs/subcomponents/drlvm/NCAI_spec.html   (with props)
    harmony/standard/site/xdocs/subcomponents/drlvm/NCAI.html   (with props)
    harmony/standard/site/xdocs/subcomponents/drlvm/NCAI.xml   (with props)
    harmony/standard/site/xdocs/subcomponents/drlvm/NCAI_spec.html   (with props)
    harmony/standard/site/xdocs/subcomponents/drlvm/NCAI_spec.xml   (with props)
Modified:
    harmony/standard/site/docs/sitemap.html
    harmony/standard/site/docs/subcomponents/drlvm/index.html
    harmony/standard/site/xdocs/sitemap.xml
    harmony/standard/site/xdocs/subcomponents/drlvm/index.xml

Modified: harmony/standard/site/docs/sitemap.html
URL: http://svn.apache.org/viewvc/harmony/standard/site/docs/sitemap.html?rev=655779&r1=655778&r2=655779&view=diff
==============================================================================
--- harmony/standard/site/docs/sitemap.html (original)
+++ harmony/standard/site/docs/sitemap.html Tue May 13 01:32:11 2008
@@ -499,6 +499,22 @@
 
                 <a href="subcomponents/drlvm/cp-verifier.html">Verifier</a>
               </li>
+
+              <li>
+
+                <a href="subcomponents/drlvm/NCAI.html">
+                  Native Code Access Interface (NCAI) implementation
+                </a>
+
+              <ul>
+                <li>
+                  <a href="subcomponents/drlvm/NCAI_spec.html">
+                    NCAI interface description
+                  </a>
+
+                </li>
+              </ul>
+              </li>
             </ul>
 
             <p>

Added: harmony/standard/site/docs/subcomponents/drlvm/NCAI.html
URL: http://svn.apache.org/viewvc/harmony/standard/site/docs/subcomponents/drlvm/NCAI.html?rev=655779&view=auto
==============================================================================
--- harmony/standard/site/docs/subcomponents/drlvm/NCAI.html (added)
+++ harmony/standard/site/docs/subcomponents/drlvm/NCAI.html Tue May 13 01:32:11 2008
@@ -0,0 +1,497 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You 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.
+-->
+
+
+<!-- start the processing -->
+    <!-- ====================================================================== -->
+    <!-- GENERATED FILE, DO NOT EDIT, EDIT THE XML FILE IN xdocs INSTEAD! -->
+    <!-- Main Page Section -->
+    <!-- ====================================================================== -->
+    <html>
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+
+                                                    <meta name="author" value="Harmony Documentation Team">
+            <meta name="email" value="dev@harmony.apache.org">
+            
+           
+            
+            
+            
+            
+            
+            <title>Apache Harmony - Native Code Access Interface</title>
+
+                        
+                        
+        <link rel="stylesheet" type="text/css" href="../../css/site.css" media="all" />
+        <link rel="stylesheet" type="text/css" href="../../css/screen.css" media="screen" />
+        <link rel="stylesheet" type="text/css" href="../../css/print.css" media="print" />
+
+                        
+        </head>
+
+        <body>
+            <div id="pageHeader">
+            <!-- Logo -->
+                        <a id="harmonyLogo" href="http://harmony.apache.org/"><img src="../../images/harmony-logo-new.png" alt="Apache Harmony"
+          width="415" height="50" /></a>
+      
+            <!-- Advertisement -->
+<!-- Keep for future use
+            <a href="http://eu.apachecon.com">
+                <img id="advertisement"
+                     src="http://eu.apachecon.com/eu2008/images/buttons/basic_234x60.jpg"
+                     width="234" height="60"
+                     alt="ApacheCon Europe 2008" /></a>
+-->
+            </div> <!-- pageHeader -->
+
+            <div id="navigationmenu">
+                    <!-- LEFT SIDE NAVIGATION -->
+                
+    <!-- ============================================================ -->
+
+                <p class="menuItem">General</p>
+        <ul>
+                    <li class="menuItem">    <a href="../../index.html">Home</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../license.html">License</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../contribution_policy.html">Contribution Policy</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../download.cgi">Downloads</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../bundles.html">Bundles</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../faq.html">FAQ</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../sitemap.html">Sitemap</a>
+</li>
+           
+                        
+        
+        </ul>
+            <p class="menuItem">Community</p>
+        <ul>
+                    <li class="menuItem">    <a href="../../get-involved.html">Get Involved</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../contributors.html">Who we are</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../mailing.html">Mailing Lists</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="http://issues.apache.org/jira/browse/HARMONY">Bug Tracker</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../related.html">Other Projects</a>
+</li>
+           
+                        
+        
+        </ul>
+            <p class="menuItem">Development</p>
+        <ul>
+                    <li class="menuItem">    <a href="../../svn.html">Source Code</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../quickhelp_contributors.html">Getting Started</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../roadmap.html">Project Roadmap</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../issue_resolution_guideline.html">Resolution Guideline</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../performance.html">Performance</a>
+</li>
+           
+                        
+        
+        </ul>
+            <p class="menuItem">Documentation</p>
+        <ul>
+                    <li class="menuItem">    <a href="http://www.jdocs.com/harmony/5.M5/overview-summary.html">API Reference</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="http://wiki.apache.org/harmony">Wiki</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../subcomponents/drlvm/index.html">DRLVM</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../subcomponents/classlibrary/index.html">Class Library</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../subcomponents/buildtest/index.html">Build-test Framework</a>
+</li>
+           
+                        
+        
+        </ul>
+            <p class="menuItem">Foundation</p>
+        <ul>
+                    <li class="menuItem">    <a href="http://apache.org">ASF</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="http://www.apache.org/foundation/sponsorship.html ">Sponsorship</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="http://www.apache.org/foundation/thanks.html ">Thanks</a>
+</li>
+           
+                        
+        
+        </ul>
+                </div>
+
+            <!-- MAIN CONTENT -->
+            <div id="top">
+                                
+                                                    <div>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements. See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You 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.
+
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+   <head>
+      <meta http-equiv="Content-Type"
+      content="text/html; charset=UTF-8" />
+      <link href="../../css/site.css" rel="stylesheet" type="text/css" />
+      <title>
+         Native Code Access Interface
+      </title>
+   </head>
+   <body>
+      <h1>
+         <a id="top" name="top"></a>Native Code Access Interface
+      </h1>
+      <ol id="TOC">
+        <li><a href="#About">About This Document</a></li>
+        <li><a href="#Overview">Overview</a>
+        <li><a href="#Key_Feature">Key Features</a></li>
+        <li><a href="#NCAI_in_VM">NCAI in VM</a></li>
+        <li><a href="#Issues">Known issues</a></li>
+        <li><a href="#References">References</a></li>
+       </ol>
+
+<!-- 1st chapter: About This Document -->
+      <h1>
+         <a id="About" name="About"></a>About This Document
+      </h1>
+      <p>
+         This document introduces the Native Code Access Interface and
+         its implementation inside the DRL virtual machine.
+      </p>
+
+<!-- 2nd chapter: Overview -->
+      <h1>
+         <a id="Overview" name="Overview"></a>Overview
+      </h1>
+      <p>
+        Some Java<a href="#*">*</a> applications need to access native code via the
+        Java<a href="#*">*</a> Native Interface (JNI) [<a href="#JNI_ref">1</a>]
+        to access native code.
+        Common Java<a href="#*">*</a> debuggers, such as Eclipse<a href="#*">*</a>
+        and NetBeans<a href="#*">*</a> debuggers, do not fully support debugging
+        native code written in programming languages like C/C++.
+        Some techniques, like the CDT plugin for Eclipse<a href="#*">*</a>,
+        are used for debugging native code in Java<a href="#*">*</a>
+        applications, but all of them have their own limitations.
+      </p>
+      <p>
+        Native Code Access Interface (NCAI) is a different approach to
+        debugging JNI code in Java<a href="#*">*</a> applications.
+        Together with JVMTI [<a href="#JVMTI_ref">2</a>] it provides in-process debugging
+        of both JIT-compiled and interpreted Java<a href="#*">*</a> bytecode,
+        and native JNI code.
+      </p>
+      <p>
+        NCAI interface is a JVMTI-like interface exposed by DRLVM
+        through a JVMTI extension. See detailed <a href="NCAI_spec.html">
+        NCAI description</a> for interface details.
+      </p>
+      <p>
+        The Eclipse<a href="#*">*</a>
+        <a href="http://softwarecommunity.intel.com/articles/eng/1435.htm">
+        plugin utilizing NCAI interface</a> is available at
+        Intel<a href="#*">*</a> What If site [<a href="#whatif_ref">3</a>].
+        This plugin supports Java<a href="#*">*</a> and C/C++, and builds
+        into Eclipse<a href="#*">*</a> IDE re-using JDT and CDT debug views.
+      </p>
+      <p>
+        Examples of NCAI usage can be found in NCAI tests sources:
+        <a href="http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/ncai/">
+        drlvm/trunk/vm/tests/ncai</a>.
+      </p>
+
+      <p class="backtotop">
+         <a href="#top">Back to Top</a>
+      </p>
+
+<!-- 3rd chapter: Key Features -->
+      <h1>
+         <a id="Key_Feature" name="Key_Feature"></a>Key Features
+      </h1>
+      <p>
+        The current NCAI implementation supports x86 architecture;
+        some features are available on x86_64.
+      </p>
+      <p>
+        Main NCAI features implemented for now:
+      </p>
+      <ul>
+        <li>
+           Setting breakpoints in native code
+        </li>
+        <li>
+           Single-stepping through native code with 3 step modes:
+           <code>STEP_INTO</code>, <code>STEP_OVER</code> and <code>STEP_OUT</code>
+        </li>
+        <li>
+           Trapping native signals and exceptions
+        </li>
+        <li>
+           Trapping loading and unloading of native modules
+        </li>
+        <li>
+           Getting information on loaded native modules
+        </li>
+        <li>
+           Getting the list of threads running in a VM process
+        </li>
+        <li>
+           OS-level thread operations: suspend, resume, terminate
+        </li>
+        <li>
+           Inspection and modification of processor registers for
+           suspended threads
+        </li>
+        <li>
+           Getting the call stack with Java<a href="#*">*</a>
+           and native frames
+        </li>
+        <li>
+           Native memory inspection and modification
+        </li>
+        <li>
+           Getting information on native signals and exceptions
+        </li>
+      </ul>
+
+      <p class="backtotop">
+         <a href="#top">Back to Top</a>
+      </p>
+
+<!-- 4th chapter: NCAI in VM -->
+      <h1>
+         <a id="NCAI_in_VM" name="NCAI_in_VM"></a>NCAI in VM
+      </h1>
+      <p>
+         NCAI is implemented as a part of DRLVM. The source code is generally
+         located in the <a
+         href="http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/">
+         drlvm/trunk/vm/vmcore/src/ncai</a> directory,
+         with platform-dependent code in
+         <a href="http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/utils/">
+         'utils'</a> subdirectory.
+      </p>
+      <p>
+         In addition to standalone code, NCAI includes code and changes
+         in other parts of DRLVM, specifically:
+      </p>
+      <ul>
+        <li>
+          In the VM Core subcomponent, NCAI extends JVMTI functionality,
+          signal handling and breakpoints processing.
+        </li>
+        <li>
+          <a href="TM.html">Thread Manager</a> contains thread operations
+          needed for NCAI operation.
+        </li>
+        <li>
+          The Porting Layer contains native modules enumeration
+          and memory access functions for NCAI needs (both are also used now
+          by <a href="crash_handler.html">Crash Handler</a>), and OS-level
+          thread operations including suspending and resuming of threads.
+          NOTE: On Linux* OS, the <code>SIGUSR2</code> signal is shared between
+          NCAI threading and <code>port_thread_yield_other()</code> function
+          implementation.
+        </li>
+        <li>
+          The encoder has been extended to enable the decoder to disassemble
+          native code; this functionality is used by NCAI single stepping
+          and by the <a href="crash_handler.html">Crash Handler</a>.
+        </li>
+      </ul>
+
+      <p class="backtotop">
+         <a href="#top">Back to Top</a>
+      </p>
+
+<!-- 5th chapter: NCAI in VM -->
+      <h1>
+         <a id="Issues" name="Issues"></a>Known issues
+      </h1>
+      <p>
+         Known issues and limitations in the current NCAI implementation include:
+      </p>
+      <ul>
+        <li>
+          Only threads attached to VM are reported.
+        </li>
+        <li>
+          The ModuleLoad and ModuleUnload events are reported only for JNI libraries.
+        </li>
+        <li>
+          The TerminateThread() function does not affect Java<a href="#*">*</a>
+          thread status.
+        </li>
+        <li>
+          The GetStackTrace() function works fine for debug build only.
+          On release build of either DRLVM or debugged library,
+          the function can return partial stack trace.
+        </li>
+        <li>
+          The thread context obtained in during Breakpoint and Single Step processing
+          is not synchronized with the thread context stored during thread suspension.
+        </li>
+      </ul>
+
+      <p class="backtotop">
+         <a href="#top">Back to Top</a>
+      </p>
+
+<!-- 6th chapter: References -->
+      <h1>
+         <a id="References" name="References"></a>References
+      </h1>
+      <p>
+         This section lists the resources used in this document and other
+         related documents.
+      </p>
+      <p>
+         [<a id="JNI_ref" name="JNI_ref"></a>1] Java<a href="#*">*</a> Native
+         Interface Specification, <a
+         href="http://java.sun.com/j2se/1.5.0/docs/guide/jni/spec/jniTOC.html"
+         target="_blank">http://java.sun.com/j2se/1.5.0/docs/guide/jni/spec/jniTOC.html</a>
+      </p>
+      <p>
+         [<a id="JVMTI_ref" name="JVMTI_ref"></a>2] JVM Tool Interface
+         Specification, <a
+         href="http://java.sun.com/j2se/1.5.0/docs/guide/jvmti/jvmti.html"
+         target="_blank">http://java.sun.com/j2se/1.5.0/docs/guide/jvmti/jvmti.html</a>
+      </p>
+      <p>
+         [<a id="whatif_ref" name="whatif_ref"></a>3] Intel<a href="#*">*</a> What If site, <a
+         href="http://whatif.intel.com"
+         target="_blank">http://whatif.intel.com</a>
+      </p>
+      
+      <p class="backtotop">
+         <a href="#top">Back to Top</a>
+      </p>
+     
+      <p>
+         <a id="*" name="*"></a>* Other brands and names are the property of
+         their respective owners.
+      </p>
+   </body>
+</html>
+</div>
+                            </div> <!-- top aka Main Content -->
+
+            <!-- FOOTER -->
+            <div id="pageFooter" class="special"><em>
+                Copyright &#169; 2003-2008, The Apache Software Foundation
+            </em></div>
+
+            <!-- Google analytics tracker code -->
+            <script
+                src="http://www.google-analytics.com/urchin.js"
+                type="text/javascript" />
+            <script type="text/javascript">
+              _uacct = "UA-1973333-3";
+              urchinTracker();
+            </script>
+        </body>
+    </html>
+<!-- end the processing -->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Propchange: harmony/standard/site/docs/subcomponents/drlvm/NCAI.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/standard/site/docs/subcomponents/drlvm/NCAI_spec.html
URL: http://svn.apache.org/viewvc/harmony/standard/site/docs/subcomponents/drlvm/NCAI_spec.html?rev=655779&view=auto
==============================================================================
--- harmony/standard/site/docs/subcomponents/drlvm/NCAI_spec.html (added)
+++ harmony/standard/site/docs/subcomponents/drlvm/NCAI_spec.html Tue May 13 01:32:11 2008
@@ -0,0 +1,2422 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You 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.
+-->
+
+
+<!-- start the processing -->
+    <!-- ====================================================================== -->
+    <!-- GENERATED FILE, DO NOT EDIT, EDIT THE XML FILE IN xdocs INSTEAD! -->
+    <!-- Main Page Section -->
+    <!-- ====================================================================== -->
+    <html>
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+
+                                                    <meta name="author" value="Harmony Documentation Team">
+            <meta name="email" value="dev@harmony.apache.org">
+            
+           
+            
+            
+            
+            
+            
+            <title>Apache Harmony - Native Code Access Interface description</title>
+
+                        
+                        
+        <link rel="stylesheet" type="text/css" href="../../css/site.css" media="all" />
+        <link rel="stylesheet" type="text/css" href="../../css/screen.css" media="screen" />
+        <link rel="stylesheet" type="text/css" href="../../css/print.css" media="print" />
+
+                        
+        </head>
+
+        <body>
+            <div id="pageHeader">
+            <!-- Logo -->
+                        <a id="harmonyLogo" href="http://harmony.apache.org/"><img src="../../images/harmony-logo-new.png" alt="Apache Harmony"
+          width="415" height="50" /></a>
+      
+            <!-- Advertisement -->
+<!-- Keep for future use
+            <a href="http://eu.apachecon.com">
+                <img id="advertisement"
+                     src="http://eu.apachecon.com/eu2008/images/buttons/basic_234x60.jpg"
+                     width="234" height="60"
+                     alt="ApacheCon Europe 2008" /></a>
+-->
+            </div> <!-- pageHeader -->
+
+            <div id="navigationmenu">
+                    <!-- LEFT SIDE NAVIGATION -->
+                
+    <!-- ============================================================ -->
+
+                <p class="menuItem">General</p>
+        <ul>
+                    <li class="menuItem">    <a href="../../index.html">Home</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../license.html">License</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../contribution_policy.html">Contribution Policy</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../download.cgi">Downloads</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../bundles.html">Bundles</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../faq.html">FAQ</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../sitemap.html">Sitemap</a>
+</li>
+           
+                        
+        
+        </ul>
+            <p class="menuItem">Community</p>
+        <ul>
+                    <li class="menuItem">    <a href="../../get-involved.html">Get Involved</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../contributors.html">Who we are</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../mailing.html">Mailing Lists</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="http://issues.apache.org/jira/browse/HARMONY">Bug Tracker</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../related.html">Other Projects</a>
+</li>
+           
+                        
+        
+        </ul>
+            <p class="menuItem">Development</p>
+        <ul>
+                    <li class="menuItem">    <a href="../../svn.html">Source Code</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../quickhelp_contributors.html">Getting Started</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../roadmap.html">Project Roadmap</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../issue_resolution_guideline.html">Resolution Guideline</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../performance.html">Performance</a>
+</li>
+           
+                        
+        
+        </ul>
+            <p class="menuItem">Documentation</p>
+        <ul>
+                    <li class="menuItem">    <a href="http://www.jdocs.com/harmony/5.M5/overview-summary.html">API Reference</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="http://wiki.apache.org/harmony">Wiki</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../subcomponents/drlvm/index.html">DRLVM</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../subcomponents/classlibrary/index.html">Class Library</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../subcomponents/buildtest/index.html">Build-test Framework</a>
+</li>
+           
+                        
+        
+        </ul>
+            <p class="menuItem">Foundation</p>
+        <ul>
+                    <li class="menuItem">    <a href="http://apache.org">ASF</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="http://www.apache.org/foundation/sponsorship.html ">Sponsorship</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="http://www.apache.org/foundation/thanks.html ">Thanks</a>
+</li>
+           
+                        
+        
+        </ul>
+                </div>
+
+            <!-- MAIN CONTENT -->
+            <div id="top">
+                                
+                                                    <div>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+    <link href="../../css/site.css" rel="stylesheet" type="text/css" />
+    <title>Native Code Access Interface description</title>
+    <style type="text/css">
+    <!--
+        .indent { margin-left: 0.5in }
+        table { border-collapse: collapse }
+    -->
+    </style>
+</HEAD>
+
+<BODY>
+
+<h1><a id="top" name="top"></a>Native Code Access Interface</h1>
+
+<p><i>Revision 0.1</i></p>
+
+<ol id="TOC">
+<li><a href="#Overview">Overview</a>
+<li><a href="#Data_types">Data types</a>
+<li><a href="#Modules">Modules</a>
+<li><a href="#Methods">Methods</a>
+<li><a href="#Threads">Threads</a>
+<li><a href="#Frames">Frames</a>
+<li><a href="#Registers">Registers</a>
+<li><a href="#Memory">Memory</a>
+<li><a href="#Signals">Signals</a>
+<li><a href="#Miscellaneous">Miscellaneous</a>
+<li><a href="#Capabilities">Capabilities</a>
+<li><a href="#Event_Management">Event Management</a>
+<li><a href="#Event_Callbacks">Event Callbacks</a>
+<li><a href="#Error_codes">Error codes</a>
+<ol>
+<li><a href="#Universal_errors">Universal errors</a>
+<li><a href="#Function_specific_errors">Function specific errors</a>
+</ol>
+<li><a href="#Priorities">Appendix 1. Priorities</a>
+</ol>
+
+
+<h1><a name="Overview"></a>Overview</h1>
+
+<p>This document describes VM debug interface which extends JVMTI to support the debugging of
+mixed managed and native code, namely Native Code Access Interface - NCAI.</p>
+
+<p>The following cannot be done without knowing VM internals:</p>
+<ul>
+    <li>mapping of native thread to java thread
+    <li>mapping of native frame to java frame
+    <li>mapping of native code to java code
+    <li>mapping of native register or memory to java field
+</ul>
+
+<p>The following can be done behind the VM:</p>
+<ul>
+    <li>tracking of modules loaded into the VM process
+    <li>mapping of native virtual address/register/stack offset to address/offset within a
+    module, and finally to symbol (class, method, variable)
+</ul>
+
+<p>
+Processing of breakpoints/watchpoints/signals can be done behind the VM, but if
+VM use the same methods to implement java breakpoints/watchpoints
+over jitted code we get a conflict of interests, so we need common
+approach.</p>
+
+<p>
+NCAI features can be accessed via an interface pointer just like it can be
+done with JNI and JVMTI interface pointers. It is used to call it
+environment pointer, or briefly environment. A NCAI environment can
+be obtained via  the following JVMTI extension function:</p>
+
+<p class="indent">
+<code>
+jvmtiError JNICALL GetExtensionEnv<br>
+&nbsp;&nbsp;&nbsp;
+(jvmtiEnv* jvmti_env, void** ncai_env_ptr, jint version);
+</code>
+</p>
+
+<p>where version is a NCAI version number like NCAI_VERSION_1_0.</p>
+
+<p>
+The function is provided by a standard JVMTI extension mechanism where it
+is identified as <code>org.apache.harmony.vm.GetExtensionEnv</code>. For
+example:</p>
+
+<p class="indent"><code>
+static const char* const GET_EXTENTION_ENV_FUNC =
+<br>
+&nbsp;&nbsp;&nbsp;
+&quot;org.apache.harmony.vm.GetExtensionEnv&quot;;
+<br>
+jint extCount = 0;
+<br>
+jvmtiExtensionFunctionInfo* extensions = 0;
+<br>
+jvmtiError err = jvmti-&gt;GetExtensionFunctions(&amp;extCount, &amp;extensions);
+<br>
+jvmtiExtensionFunction
+<br>
+func = 0;
+<br>
+for (jint i = 0; i &lt; extCount; i++) {
+<br>
+&nbsp;&nbsp;&nbsp;
+if (strcmp(extensions[i].id, GET_EXTENTION_ENV_FUNC) == 0) {
+<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+func = extensions[i].func;
+<br>
+&nbsp;&nbsp;&nbsp;
+}
+<br>
+&nbsp;&nbsp;&nbsp;
+jvmti-&gt;Deallocate(extensions[i].id);
+<br>
+&nbsp;&nbsp;&nbsp;
+jvmti-&gt;Deallocate(extensions[i].short_description);
+<br>
+&nbsp;&nbsp;&nbsp;
+for (jint j = 0; j &lt; extensions[i].param_count; j++) {
+<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+jvmti-&gt;Deallocate(extensions[i].params[j].name);
+<br>
+&nbsp;&nbsp;&nbsp;
+}
+<br>
+&nbsp;&nbsp;&nbsp;
+jvmti-&gt;Deallocate(extensions[i].params);
+<br>
+&nbsp;&nbsp;&nbsp;
+jvmti-&gt;Deallocate(extensions[i].errors);
+<br>
+}
+<br>
+ncaiEnv* ncai = 0;
+<br>
+if (func != NULL) {
+<br>
+&nbsp;&nbsp;&nbsp;
+err = func(jvmti, &amp;ncai, NCAI_VERSION_1_0);
+<br>
+}
+</code></p>
+
+<h1><a name="Data_types"></a>Data types</h1>
+
+<p><code>
+struct _ncai;
+<br>
+typedef _ncai* ncaiEnv;
+</code></p>
+
+<p class="indent">Interface pointer to structure containing the NCAI function table
+just like JNI and JVMTI do.</p>
+
+<p><code>
+typedef enum {...} ncaiError;
+</code></p>
+
+<p class="indent">An error code which every NCAI function returns.</p>
+
+<p><code>
+struct _ncaiModule;
+<br>
+typedef _ncaiModule* ncaiModule;
+</code></p>
+
+<p class="indent">Opaque reference to VM
+internal data structure which represents a loadable module.</p>
+
+<p><code>
+struct ncaiModuleInfo;
+<br>
+struct ncaiSegmentInfo;
+</code></p>
+
+<p class="indent">Structures containing module information. See the GetModuleInfo function.</p>
+
+<p><code>
+typedef enum {} ncaiModuleKind;
+</code></p>
+
+<p class="indent">An identifier for a module type. See the GetModuleInfo function.</p>
+
+<p><code>
+typedef enum {} ncaiSegmentKind;
+</code></p>
+
+<p class="indent">An identifier for a segment type. See the GetModuleInfo function.</p>
+
+<p><code>
+struct _ncaiThread;
+<br>
+typedef _ncaiThread* ncaiThread;
+</code></p>
+
+<p class="indent">Opaque reference to VM internal data structure
+which represents a thread attached to the VM process.</p>
+
+<p><code>
+struct ncaiThreadInfo;
+</code></p>
+
+<p class="indent">Structure containing thread information. See the GetThreadInfo function.</p>
+
+<p><code>
+typedef enum {} ncaiThreadKind;
+</code></p>
+
+<p class="indent">An identifier for a thread type. See the GetThreadInfo function.</p>
+
+<p><code>
+struct ncaiFrameInfo;
+</code></p>
+
+<p class="indent">Structure containing frame information. See the GetStackTrace function.</p>
+
+<p><code>
+struct ncaiRegisterInfo;
+</code></p>
+
+<p class="indent">Structure containing register information. See the GetRegisterInfo function.</p>
+
+<p><code>
+struct ncaiSignalInfo;
+</code></p>
+
+<p class="indent">Structure containing signal information. See the GetSignalInfo function.</p>
+
+<p><code>
+struct ncaiCapabilities;
+</code></p>
+
+<p class="indent">Capabilities of a NCAI environment. TBD.</p>
+
+<p><code>
+struct ncaiEventCallbacks;
+</code></p>
+
+<p class="indent">Structure containing the list of event callback functions.</p>
+
+<p><code>
+typedef enum {} ncaiEventMode;<br>
+<br>
+typedef enum {} ncaiEventKind;
+</code></p>
+
+<p class="indent">Identifiers for event mode and type. See the SetEventNotificationMode function.</p>
+
+<p><code>
+typedef enum {} ncaiWatchpointMode;
+</code></p>
+
+<p class="indent">An identifier for the Watchpoint event mode. See the SetWatchpoint function.</p>
+
+<p><code>
+typedef enum {} ncaiStepMode;
+</code></p>
+
+<p class="indent">An identifier for the Step event mode. See the SetStepMode function.</p>
+
+
+
+<h1><a name="Modules"></a>Modules</h1>
+
+<p><code>ncaiError JNICALL GetAllLoadedModules
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, jint* count_ptr, ncaiModule** modules_ptr);
+</code></p>
+
+<p>
+Get a list of all modules which are loaded to the
+VM process. <i>All the returned module pointers remain valid at least
+till the next function call.</i></p>
+
+<p class="indent">
+Parameters:
+</p>
+<ul>
+    <li class="indent">count_ptr -
+    pointer to a jint which will be set on return with number of
+    modules.
+    <li class="indent">modules_ptr -
+    pointer to a ncaiModule* which will be set on return with
+    address of a newly allocated array of ncaiModule's. The array
+    should be freed by JVMTI function Deallocate.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">no function specific errors
+</ul>
+
+<p><code>
+ncaiError JNICALL GetModuleInfo
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiModule module, ncaiModuleInfo* info_ptr);
+</code></p>
+
+<p>
+Get the module information. Fills the following
+structure:</p>
+
+<p class="indent"><code>
+typedef enum {
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_MODULE _JNI_LIBRARY,
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_MODULE _VM_INTERNAL,
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_MODULE _OTHER
+<br>
+} ncaiModuleKind;
+</code></p>
+
+<p class="indent"><code>
+typedef struct {
+<br>
+&nbsp;&nbsp;&nbsp;
+ncaiModuleKind kind;
+<br>
+&nbsp;&nbsp;&nbsp;
+char* name;
+<br>
+&nbsp;&nbsp;&nbsp;
+char* filename;
+<br>
+&nbsp;&nbsp;&nbsp;
+ncaiSegmentInfo* segments;
+<br>
+&nbsp;&nbsp;&nbsp;
+size_t segment_count;
+<br>
+} ncaiModuleInfo;
+</code></p>
+
+<p>The
+kind field determines the module kind from the point of view of VM.
+The segments field will be set on return with a pointer to array of
+the following structures:</p>
+
+<p class="indent"><code>
+typedef enum {
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_SEGMENT_UNKNOWN,
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_SEGMENT_CODE,
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_SEGMENT_DATA
+<br>
+} ncaiSegmentKind;
+</code></p>
+
+<p class="indent"><code>
+typedef struct {
+<br>
+&nbsp;&nbsp;&nbsp;
+ncaiSegmentKind kind;
+<br>
+&nbsp;&nbsp;&nbsp;
+void* base_address;
+<br>
+&nbsp;&nbsp;&nbsp;
+size_t size;
+<br>
+} ncaiSegmentInfo;
+</code></p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">module - the module to analyze.
+    <li class="indent">info_ptr -
+    pointer to a ncaiModuleInfo whose fields will be set on return
+    with information which includes module kind and newly allocated
+    arrays of name, filename and segments. The arrays of name, filename
+    and segments should be freed by JVMTI function Deallocate.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">NCAI_ERROR_INVALID_MODULE - module is not a valid ncaiModule.
+</ul>
+
+<p><code>
+ncaiError JNICALL GetModuleClassLoader
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiModule module, jobject* classloader_ptr);
+</code></p>
+
+<p>
+Get the JNI library module class loader. Returns
+NULL if the module was loaded by the bootstrap class loader. If the
+module is not of NCAI_MODULE _JNI_LIBRARY kind the function returns
+an error.</p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">module - the module to analyze.
+    <li class="indent">classloader_ptr - pointer to a jobject
+    which will be set on return with class loader object.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">NCAI_ERROR_INVALID_MODULE - module is not a valid ncaiModule.
+</ul>
+</p>
+
+
+
+<h1><a name="Methods"></a>Methods</h1>
+
+<p><code>
+ncaiError JNICALL IsMethodCompiled
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, jmethodID method, jboolean* is_compiled_ptr);
+</code></p>
+
+<p>
+Indicates if the java method is actually in
+compiled form.</p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">method - the method to analyze.
+    <li class="indent">is_compiled_ptr - pointer to a jboolean which will be set on return.
+</ul>
+
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">NCAI_ERROR_INVALID_METHOD - method is not a valid java method id.
+</ul>
+
+<p><code>
+ncaiError JNICALL GetMethodLocation
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, jmethodID method, void** address_ptr, size_t* size_ptr);
+</code></p>
+
+<p>Get a native address where compiled method is loaded and the size of
+compiled code. <i>This is a convenience method corresponding to the
+CompiledMethodLoad event callback of JVMTI. So, the values returning
+in address_ptr and size_ptr should be the same as  code_addr and
+code_size parameters of  the callback.</i></p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">method - the method to analyze.
+    <li class="indent">address_ptr - pointer to a void* which will be set on return
+    with starting address of compiled code.
+    <li class="indent">size_ptr - pointer to a zise_t which will be set on return
+    with size of compiled code.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">NCAI_ERROR_INVALID_METHOD - method is not a valid java method id.
+    <li class="indent">NCAI_ERROR_NOT_COMPILED - method is not compiled yet.
+</ul>
+
+<p><code>
+ncaiError JNICALL FindJavaMethod
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, void* address, jmethodID* method_ptr);
+</code></p>
+
+<p>Finds a compiled java
+method which corresponds to the given native address.</p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">address - the native address to analyze.
+    <li class="indent">method_ptr - pointer to a jmethodID which will be set on return with java
+    method id or 0 if such method does not exist.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">NCAI_ERROR_INVALID_ADDRESS - address is not located inside a compiled java method.
+</ul>
+
+<p><code>
+ncaiError JNICALL GetBytecodeLocation
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, void* address, jmethodID method, jlocation* location_ptr);
+</code></p>
+
+<p>Get a bytecode location in compiled java method which corresponds to the
+given native address.</p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">address - the native address inside a compiled java method.
+    <li class="indent">method - the java method to analyze.
+    <li class="indent">location_ptr - pointer to a jlocation which will be set on return with index of
+    bytecode instruction corresponding to the native address.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">NCAI_ERROR_INVALID_METHOD - method is not a valid java method id.
+    <li class="indent">NCAI_ERROR_INVALID_ADDRESS - address is not located inside the compiled java method.
+    <li class="indent">NCAI_ERROR_NOT_COMPILED - method is not compiled yet.
+</ul>
+
+<p><code>
+ncaiError JNICALL GetNativeLocation
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, jmethodID method, jlocation location, void** address_ptr);
+</code></p>
+
+<p>Get a native address which corresponds to the given bytecode location in
+compiled method. <i>This is a convenience method corresponding to the
+CompiledMethodLoad event callback of JVMTI. So, the value returning
+in address_ptr should be the same as start_address corresponding to
+the location in map parameter of  the callback.</i></p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">method - the java method to analyze.
+    <li class="indent">location - the index of the bytecode instruction inside the method.
+    <li class="indent">address_ptr - pointer to a void* which will be set on return with native address
+    of compiled code corresponding to the location.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">NCAI_ERROR_INVALID_METHOD - method is not a valid java method id.
+    <li class="indent">NCAI_ERROR_INVALID_LOCATION - location is not a valid location.
+    <li class="indent">NCAI_ERROR_NOT_COMPILED - method is not compiled yet.
+</ul>
+
+
+
+<h1><a name="Threads"></a>Threads</h1>
+
+<p><code>
+ncaiError JNICALL GetAllThreads
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, jint* count_ptr, ncaiThread** threads_ptr);
+</code></p>
+
+<p>Get a list of all known threads. <i>All the returned thread pointers
+remain valid at least till the next function call.</i></p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">count_ptr - pointer to a jint which will be set on return with number of threads.
+    <li class="indent">threads_ptr - pointer to a ncaiThread * which will be set on return with address
+    of a newly allocated array of ncaiThread’s. The array should be freed by JVMTI function Deallocate.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">no function specific errors.
+</ul>
+
+<p><code>
+ncaiError JNICALL GetThreadInfo
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiThread thread, ncaiThreadInfo* info_ptr);
+</code></p>
+
+<p>
+Get the thread information. Fills the following structure:</p>
+
+<p><code>
+typedef enum {
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_THREAD_JAVA,
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_THREAD_VM_INTERNAL,
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_THREAD_OTHER
+<br>
+} ncaiThreadKind;
+</code></p>
+
+<p><code>
+typedef struct {
+<br>
+&nbsp;&nbsp;&nbsp;
+ncaiThreadKind kind;
+<br>
+&nbsp;&nbsp;&nbsp;
+char* name;
+<br>
+} ncaiThreadInfo;
+</code></p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">thread - the thread to analyze.
+    <li class="indent">info_ptr - pointer to a ncaiThreadInfo whose fields will be set on return
+    with information which includes thread kind and newly allocated
+    array of name. The array of name should be freed by JVMTI function Deallocate.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">NCAI_ERROR_INVALID_THREAD - thread is not a valid ncaiThread.
+</ul>
+
+<p><code>
+ncaiError JNICALL GetThreadHandle
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, jthread thread, ncaiThread* thread_ptr);
+</code></p>
+
+<p>
+Get a thread handle for the given java thread
+object (0, if such object does not exist).</p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">thread - the thread to analyze.
+    <li class="indent">thread_ptr - pointer to a ncaiThread which will be set on return with appropriate value.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">NCAI_ERROR_INVALID_THREAD - thread is not a valid jthread.
+</ul>
+
+<p><code>
+ncaiError JNICALL GetThreadObject
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiThread thread, jthread* thread_ptr);
+</code></p>
+
+<p>
+Get a java thread object for the given thread
+handle (0, if such object does not exist).</p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">thread - the ncaiThread to analyze.
+    <li class="indent">thread_ptr - pointer to a jthread which will be set on return with appropriate value.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">NCAI_ERROR_INVALID_THREAD - thread is not a valid ncaiThread.
+    <li class="indent">NCAI_ERROR_THREAD_NOT_ALIVE - the thread is not alive.
+</ul>
+
+<p><code>
+ncaiError JNICALL SuspendThread
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiThread thread);
+</code></p>
+
+<p>
+Suspend the given thread. <i>This is really a hard
+suspend which means one should take care about possible deadlock if
+some thread will try to enter a monitor acquired by the suspended
+thread.</i></p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">thread - the thread to suspend.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">NCAI_ERROR_INVALID_THREAD - thread is not a valid ncaiThread.
+    <li class="indent">NCAI_ERROR_THREAD_SUSPENDED - thread is already suspended.
+    <li class="indent">NCAI_ERROR_THREAD_NOT_ALIVE - the thread is not alive.
+</ul>
+
+<p><code>
+ncaiError JNICALL ResumeThread
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiThread thread);
+</code></p>
+
+<p>Resume the given thread.</p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">thread - the thread to resume.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">NCAI_ERROR_INVALID_THREAD - thread is not a valid ncaiThread.
+    <li class="indent">NCAI_ERROR_THREAD_NOT_SUSPENDED - thread is not suspended.
+    <li class="indent">NCAI_ERROR_THREAD_NOT_ALIVE - the thread is not alive.
+</ul>
+
+<p><code>
+ncaiError JNICALL TerminateThread
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiThread thread);
+</code></p>
+
+<p>
+Terminate the given thread. Not all acquired locks
+and owned JVMTI monitors could be released, so care must be taken to
+prevent a possible deadlock.</p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">thread - the thread to terminate.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">NCAI_ERROR_INVALID_THREAD - thread is not a valid ncaiThread.
+    <li class="indent">NCAI_ERROR_THREAD_NOT_ALIVE - the thread is not alive.
+</ul>
+
+<p><code>
+ncaiError JNICALL GetThreadState
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, jthread thread, jint* state_ptr);
+</code></p>
+
+<p>Get a state for the given thread. <i>TBD</i>.</p>
+
+
+
+<h1><a name="Frames"></a>Frames</h1>
+
+<p><code>
+ncaiError JNICALL GetFrameCount
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiThread thread, jint* count_ptr);
+</code></p>
+
+<p>
+Get the total number of frames in the given
+thread. The thread needs to be either suspended or the current thread
+in breakpoint or step callback.</p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">thread - the thread to analyze.
+    <li class="indent">count_ptr - pointer to a jint which will be set on return with number of stack frames.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">NCAI_ERROR_INVALID_THREAD - thread is not a valid ncaiThread.
+    <li class="indent">NCAI_ERROR_THREAD_NOT_SUSPENDED - thread is not suspended or current.
+</ul>
+
+<p><code>
+ncaiError JNICALL GetStackTrace
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiThread thread, jint depth, ncaiFrameInfo* frame_buffer, jint* count_ptr);
+</code></p>
+
+<p>
+Get the stack frame information for the given
+thread. The depth specifies capacity of the frame_buffer. The thread
+needs to be either suspended or the current thread in breakpoint or
+step callback.</p>
+
+
+<p><code>
+typedef struct {
+<br>
+&nbsp;&nbsp;&nbsp;
+jint java_frame_depth;
+<br>
+&nbsp;&nbsp;&nbsp;
+void* pc_address;
+<br>
+&nbsp;&nbsp;&nbsp;
+void* return_address;
+<br>
+&nbsp;&nbsp;&nbsp;
+void* frame_address;
+<br>
+&nbsp;&nbsp;&nbsp;
+void* stack_address;
+<br>
+} ncaiFrameInfo;
+</code></p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">thread - the thread to analyze.
+    <li class="indent">depth - the maximum number of stack frames to retrieve.
+    <li class="indent">frame_buffer - preallocated buffer large enough to hold depth ncaiFrameInfo
+    objects which fields will be set on return with appropriate values.
+    <li class="indent">count_ptr - pointer to a jint which will be set on return with number of stack
+    frames passed to the buffer.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">NCAI_ERROR_INVALID_THREAD - thread is not a valid ncaiThread.
+    <li class="indent">NCAI_ERROR_THREAD_NOT_SUSPENDED - thread is not suspended or current.
+</ul>
+
+
+
+<h1><a name="Registers"></a>Registers</h1>
+
+<p><code>
+ncaiError JNICALL GetRegisterCount
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, jint* count_ptr);
+</code></p>
+
+<p>Get a number of native registers.</p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">count_ptr - pointer to a jint which will be set on return with number of registers.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">no function specific errors.</p>
+</ul>
+
+<p><code>
+ncaiError JNICALL GetRegisterlInfo
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, jint reg_number, ncaiRegisterInfo* info_ptr);
+</code></p>
+
+<p>Get the register information. Fills the following structure:</p>
+
+<p><code>
+typedef struct {
+<br>
+&nbsp;&nbsp;&nbsp;
+char* name;
+<br>
+&nbsp;&nbsp;&nbsp;
+jint size;
+<br>
+} ncaiRegisterInfo;
+</code></p>
+
+<p>
+Field name is the register name and size is the
+register size in bits.</p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">reg_number - the number of register to analyze.
+    <li class="indent">info_ptr - pointer to a ncaiRegisterInfo whose fields
+    will be set on return with information.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">NCAI_ERROR_ILLEGAL_ARGUMENT - reg_number is not a valid register number.
+</ul>
+
+<p><code>
+ncaiError JNICALL GetRegisterValue
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiThread thread, jint reg_number, void* buf);
+</code></p>
+
+<p>
+Get the register value for the given thread. The
+thread needs to be either suspended or the current thread in
+breakpoint or step callback.</p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">reg_number - the number of register.
+    <li class="indent">buf - preallocated buffer large enough to hold register value
+    which will be set on return.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">NCAI_ERROR_ILLEGAL_ARGUMENT - reg_number is not a valid register number.
+    <li class="indent">NCAI_ERROR_THREAD_NOT_SUSPENDED - thread is not suspended or current.
+</ul>
+
+<p><code>
+ncaiError JNICALL SetRegisterValue
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiThread thread, jint reg_number, void* buf);
+</code></p>
+
+<p>
+Set the register value for the given thread. The
+thread needs to be either suspended or the current thread in
+breakpoint or step callback.</p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">reg_number - the number of register.
+    <li class="indent">buf - buffer which contains a register value.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">NCAI_ERROR_ILLEGAL_ARGUMENT - reg_number is not a valid register number.
+    <li class="indent">NCAI_ERROR_THREAD_NOT_SUSPENDED - thread is not suspended or current.
+</ul>
+
+
+
+<h1><a name="Memory"></a>Memory</h1>
+
+<p>The following functions
+should hide/preserve any instrumentation of a native code done by the
+VM</p>
+
+<p><code>
+ncaiError JNICALL ReadMemory
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, void* addr, size_t size, void* buf);
+</code></p>
+
+<p>Read the memory block.</p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">addr - the address of memory block
+    <li class="indent">size - the size of memory block in bytes.
+    <li class="indent">buf - preallocated buffer large enough to hold a copy of memory block.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">NCAI_ERROR_ACCESS_DENIED - access to the memory block is denied.
+</ul>
+
+<p><code>
+ncaiError JNICALL WriteMemory
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, void* addr, size_t size, void* buf);
+</code></p>
+
+<p>Write the memory block.</p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">addr - the address of memory block.
+    <li class="indent">size - the size of memory block in bytes.
+    <li class="indent">buf - buffer which contains values which will be copied to memory block.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">NCAI_ERROR_ACCESS_DENIED - access to the memory block is denied.
+</ul>
+
+
+
+<h1><a name="Signals"></a>Signals</h1>
+
+<p><code>
+ncaiError JNICALL GetSignalCount
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, jint* count_ptr);
+</code></p>
+
+<p>Get a number of signals supported by the platform.</p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">count_ptr - pointer to a jint which will be set on return with number of signals.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">no function specific errors.
+</ul>
+
+<p><code>
+ncaiError JNICALL GetSignalInfo
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, jint signal, ncaiSignalInfo* info_ptr);
+</code></p>
+
+<p>Get the signal information. Fills the following structure:</p>
+
+<p><code>
+typedef struct {
+<br>
+&nbsp;&nbsp;&nbsp;
+char* name;
+<br>
+} ncaiSignalInfo;
+</code></p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">signal - the number of signal.
+    <li class="indent">info_ptr - pointer to a ncaiSignalInfo whose fields will be set on return with information.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">NCAI_ERROR_ILLEGAL_ARGUMENT - signal is not a valid signal number.
+</ul>
+
+
+
+<h1><a name="Miscellaneous"></a>Miscellaneous</h1>
+
+<p><code>
+ncaiError JNICALL GetJvmtiEnv
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, jvmtiEnv** jvmti_env_ptr);
+</code></p>
+
+<p>Get JVMTI environment which NCAI environment extends.</p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">jvmti_env_ptr - pointer to a jvmtiEnv* which will be set on return with
+    appropriate JVMTI environment.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">no function specific errors.
+</ul>
+
+<p><code>
+ncaiError JNICALL GetVersion
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, jint* version_ptr);
+</code></p>
+
+<p>Get the NCAI version number. The version number
+consists of major, minor and micro parts just like the JVMTI version
+identifier.</p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">version_ptr - pointer to a jint which will be set on return with actual version of
+    NCAI implementation.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">no function specific errors.
+</ul>
+
+<p><code>
+ncaiError JNICALL GetErrorName
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiError err, const char** name_ptr);
+</code></p>
+
+<p>Get symbolic representation for the given error code.</p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">name_ptr - pointer to a char* which will be set on return with address of a
+    newly allocated array of characters. The array should be freed by
+    JVMTI function Deallocate.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">NCAI_ERROR_ILLEGAL_ARGUMENT - err is not a valid ncaiError.
+</ul>
+
+
+
+<h1><a name="Capabilities"></a>Capabilities</h1>
+
+<p><code>
+typedef struct {
+<br>
+&nbsp;&nbsp;&nbsp;
+// ...
+<br>
+} ncaiCapabilities;
+</code></p>
+
+<p><code>
+ncaiError JNICALL GetPotentialCapabilities
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiCapabilities* caps_ptr);
+</code></p>
+
+<p>Get capabilities which the NCAI environment can potentially possess.</p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">caps_ptr - pointer to ncaiCapabilities which will be set on return with
+    potential capabilities.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">no function specific errors.
+</ul>
+
+<p><code>
+ncaiError JNICALL GetCapabilities
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiCapabilities* caps_ptr);
+</code></p>
+
+<p>Get currently possessed capabilities.</p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">caps_ptr - pointer to ncaiCapabilities which will be set on return with
+    possessed capabilities.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">no function specific errors.
+</ul>
+
+<p><code>
+ncaiError JNICALL AddCapabilities
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiCapabilities* caps_ptr);
+</code></p>
+
+<p>Add the specified capabilities.</p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">caps_ptr - pointer to ncaiCapabilities to add.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">no function specific errors.
+</ul>
+
+<p><code>
+ncaiError JNICALL RelinquishCapabilities
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiCapabilities* caps_ptr);
+</code></p>
+
+<p>Relinquish the specified capabilities.</p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">caps_ptr - pointer to ncaiCapabilities to relinquish.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">no function specific errors.
+</ul>
+
+
+
+<h1><a name="Event_Management"></a>Event Management</h1>
+
+<p><code>
+ncaiError JNICALL GetEventCallbacks
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiEventCallbacks* callbacks, size_t size);
+</code></p>
+
+<p>Get the event callbacks.</p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">callbacks - pointer to ncaiEventCallbacks which will be set on return with
+    current event callbacks.
+    <li class="indent">size - the size of callbacks.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">no function specific errors.
+</ul>
+
+<p><code>
+ncaiError JNICALL SetEventCallbacks
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiEventCallbacks* callbacks, size_t size);
+</code></p>
+
+<p>Set the event callbacks.</p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">callbacks - pointer to ncaiEventCallbacks to set.
+    <li class="indent">size - the size of callbacks.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">no function specific errors.
+</ul>
+
+<p><code>
+ncaiError JNICALL SetEventNotificationMode
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiEventMode mode, ncaiEventKind event, ncaiThread thread);
+</code></p>
+
+<p>
+Set the event notification mode for the given
+thread. If thread is NULL, the mode is set for all the known threads.
+The ncaiEventMode and ncaiEventKind are the following:</p>
+
+<p class="indent"><code>
+typedef enum {
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_ENABLE = 1,
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_DISABLE = 0
+<br>
+} ncaiEventMode;
+</code></p>
+
+
+<p class="indent"><code>
+typedef enum {
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_EVENT_THREAD_START = 1,
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_EVENT_THREAD_END,
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_EVENT_BREAKPOINT,
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_EVENT_STEP,
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_EVENT_WATCHPOINT,
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_EVENT_METHOD_ENTRY,
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_EVENT_METHOD_EXIT,
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_EVENT_FRAME_POP,
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_EVENT_SIGNAL,
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_EVENT_EXCEPTION,
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_EVENT_MODULE_LOAD,
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_EVENT_MODULE_UNLOAD,
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_EVENT_CONSOLE_INPUT,
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_EVENT_CONSOLE_OUTPUT,
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_EVENT_DEBUG_OUTPUT
+<br>
+} ncaiEventKind;
+</code></p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">mode - the mode to set.
+    <li class="indent">event - the event to control.
+    <li class="indent">thread - the thread to control.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">NCAI_ERROR_ILLEGAL_ARGUMENT - mode or event is not valid.
+    <li class="indent">NCAI_ERROR_INVALID_THREAD - thread is not a valid ncaiThread.
+    <li class="indent">NCAI_ERROR_THREAD_NOT_ALIVE - the thread is not alive.
+</ul>
+
+<p><code>
+ncaiError JNICALL SetBreakpoint
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, void* code_addr);
+</code></p>
+
+<p>Set a breakpoint at the given address code_addr.</p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">code_addr - the native address of the breakpoint.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">NCAI_ERROR_DUPLICATE - the designated breakpoint is already set.
+</ul>
+
+<p><code>
+ncaiError JNICALL ClearBreakpoint
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, void* code_addr);
+</code></p>
+
+<p>Clear a breakpoint at the given address code_addr.</p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">code_addr - the native address of the breakpoint.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">NCAI_ERROR_NOT_FOUND - the designated breakpoint is not found.
+</ul>
+
+<p><code>
+ncaiError JNICALL SetWatchpoint
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, void* data_addr, size_t len, ncaiWatchpointMode mode);
+</code></p>
+
+<p>Set a watchpoint starting at the given address data_addr for len bytes.</p>
+
+<p class="indent"><code>
+typedef enum {
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_WATCHPOINT_READ,
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_WATCHPOINT_WRITE,
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_WATCHPOINT_ACCESS
+<br>
+} ncaiWatchpointMode;
+</code></p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">data_addr - the starting address of memory block to watch.
+    <li class="indent">len - the length in bytes of the memory block.
+    <li class="indent">mode - the mode to watch.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">NCAI_ERROR_DUPLICATE - the designated watchpoint is already set.
+</ul>
+
+<p><code>
+ncaiError JNICALL ClearWatchpoint
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, void* data_addr);
+</code></p>
+
+<p>Clear a watchpoint starting at the given address data_addr.</p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">data_addr - the starting address of watching memory block.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">NCAI_ERROR_NOT_FOUND - the designated watchpoint is not found.
+</ul>
+
+<p><code>
+ncaiError JNICALL SetStepMode
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiThread thread, ncaiStepMode mode);
+</code></p>
+
+<p>Set the step mode for the given thread. If thread is NULL, the mode is set for all the known threads.</p>
+
+<p class="indent"><code>
+typedef enum {
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_STEP_OFF,
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_STEP_INTO,
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_STEP_OVER,
+<br>
+&nbsp;&nbsp;&nbsp;
+NCAI_STEP_OUT
+<br>
+} ncaiStepMode;
+</code></p>
+
+<p>NCAI_STEP_OFF disables generating step events for the given thread, NCAI_STEP_INTO
+enables generating step event for each CPU instruction,
+NCAI_STEP_OVER enables generating step event for each CPU instruction
+skipping function calls, NCAI_STEP_OUT disables generating step
+event untill the function returns.</p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">thread - the thread to control.
+    <li class="indent">mode - the mode to set.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">NCAI_ERROR_ILLEGAL_ARGUMENT - mode is not valid.
+    <li class="indent">NCAI_ERROR_INVALID_THREAD - thread is not a valid ncaiThread.
+    <li class="indent">NCAI_ERROR_THREAD_NOT_ALIVE - the thread is not alive.
+</ul>
+
+<p><code>
+ncaiError JNICALL NotifyFramePop
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiThread thread, void* frame_address);
+</code></p>
+
+<p>Set a trigger to notify when the frame of the given address is popped from the given thread stack.</p>
+
+<p class="indent">Parameters:</p>
+<ul>
+    <li class="indent">thread - the thread to watch.
+    <li class="indent">frame_addr - the address of frame to watch.
+</ul>
+
+<p class="indent">Errors:</p>
+<ul>
+    <li class="indent">NCAI_ERROR_INVALID_THREAD - thread is not a valid ncaiThread.
+    <li class="indent">NCAI_ERROR_THREAD_NOT_ALIVE - the thread is not alive.
+    <li class="indent">NCAI_ERROR_NOT_FOUND - the designated frame is not found.
+</ul>
+
+
+
+<h1><a name="Event_Callbacks"></a>Event Callbacks</h1>
+
+<p>The following callbacks are called from within an appropriate application thread
+and are not queued by the VM.</p>
+
+<p><code>
+void JNICALL ThreadStart
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiThread thread);
+</code></p>
+
+<p>This callback is invoked when the thread is about to enter its initial method.</p>
+
+<p><code>
+void JNICALL ThreadEnd
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiThread thread);
+</code></p>
+
+<p>This callback is invoked just after the thread exits its initial method.</p>
+
+<p><code>
+void JNICALL Step
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiThread thread, void* addr);
+</code></p>
+
+<p>This callback is invoked when the native thread specified in SetStepMode
+request reaches a new native instruction address according to the
+specified step mode.</p>
+
+
+<p><code>
+void JNICALL Breakpoint
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiThread thread, void* addr);
+</code></p>
+
+<p>
+This callback is invoked when the native thread
+specified in SetBreakpoint request reaches the specified native
+instruction address.</p>
+
+<p><code>
+void JNICALL Watchpoint
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiThread thread, void* code_addr, void* data_addr);
+</code></p>
+
+<p>
+This callback is invoked when the native thread
+specified in SetWatchpoint request accesses the specified native data
+address according to the specified watchpoint mode.</p>
+
+<p><code>
+void JNICALL Signal
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiThread thread, void* addr, jint signal, jboolean is_internal, jboolean* is_handled);
+</code></p>
+
+<p>
+This callback is invoked when OS notifies the VM
+process about a raised signal. is_internal indicates whether the VM
+raises the signal for internal use. is_handled is in/out flag which
+indicates whether the VM will handle the signal or not. The actual
+set of possible signals depends on platform.</p>
+
+<p><code>
+void JNICALL Exception
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiThread thread, void* addr, void* exception);
+</code></p>
+
+<p>This callback is invoked when C++ exception is thrown. <i>TBD</i>.</p>
+
+<p><code>
+void JNICALL ModuleLoad
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiThread thread, ncaiModule module);
+</code></p>
+
+<p>This callback is invoked when the VM process loads an executable module.</p>
+
+<p><code>
+void JNICALL ModuleUnload
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiThread thread, ncaiModule module);
+</code></p>
+
+<p>This callback is invoked when the VM process is about to unload an executable module.</p>
+
+<p><code>
+void JNICALL MethodEntry
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiThread thread, void* addr);
+</code></p>
+
+<p>This callback is invoked when the thread is about to enter a method.</p>
+
+<p><code>
+void JNICALL MethodExit
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiThread thread, void* addr);
+</code></p>
+
+<p>This callback is invoked when the thread is about to exit a method.</p>
+
+<p><code>
+void JNICALL FramePop
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, ncaiThread thread, void* addr);
+</code></p>
+
+<p>This callback is invoked when the thread is about to exit a frame
+specified in NotifyFramePop request.</p>
+
+<p><code>
+void JNICALL ConsoleInput
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, char** message);
+</code></p>
+
+<p> This callback is invoked when the VM process tries to read data from standard input. <i>TBD</i>.</p>
+
+<p><code>
+void JNICALL ConsoleOutput
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, char* message);
+</code></p>
+
+<p>This callback is invoked when the VM process is about to write a message to standard output. <i>TBD</i>.</p>
+
+<p><code>
+void JNICALL DebugMessage
+<br>
+&nbsp;&nbsp;&nbsp;
+(ncaiEnv* env, char* message);
+</code></p>
+
+<p>This callback is invoked when the VM process sends a debug message. <i>TBD</i>.</p>
+
+
+
+<h1><a name="Error_codes"></a>Error codes</h1>
+
+<p>The following is a list of possible error codes which can be returned by
+NCAI functions. <i>Universal errors</i> can be returned by any
+function and so they are not specified in the above function error
+lists. On the contrary <i>function specific errors</i> can be
+returned only by the functions which include them in the function
+errors specification.</p>
+
+
+<h2><a name="Universal_errors"></a>Universal errors</h2>
+
+<p>
+NCAI_ERROR_NONE
+<br>
+<span class="indent">Indicates a successful completion of the function.</span>
+</p>
+
+<p>
+NCAI_ERROR_NULL_POINTER
+<br>
+<span class="indent">A pointer argument is equal to 0 which is not acceptable for the function.</span>
+</p>
+
+<p>NCAI_ERROR_OUT_OF_MEMORY
+<br>
+<span class="indent">Not enough allocatable memory available to process the function.</span>
+</p>
+
+<p>NCAI_ERROR_ACCESS_DENIED
+<br>
+<span class="indent">Access is denied.</span>
+</p>
+
+<p>NCAI_ERROR_UNATTACHED_THREAD
+<br>
+<span class="indent">The calling thread is not attached to the VM.</span>
+</p>
+
+<p>NCAI_ERROR_INVALID_ENVIRONMENT
+<br>
+<span class="indent">The NCAI environment is not valid.</span>
+</p>
+
+<p>NCAI_ERROR_INTERNAL
+<br>
+<span class="indent">An unexpected internal error.</span>
+</p>
+
+<p>NCAI_ERROR_ILLEGAL_ARGUMENT
+<br>
+<span class="indent">Illegal value of argument.</span>
+</p>
+
+
+<h2><a name="Function_specific_errors"></a>Function specific errors</h2>
+
+<p>NCAI_ERROR_NOT_AVAILABLE
+<br>
+<span class="indent">Function is not implemented.</span>
+</p>
+
+<p>NCAI_ERROR_INVALID_MODULE
+<br>
+<span class="indent">The module specified by argument is not a valid ncaiModule.</span>
+</p>
+
+<p>NCAI_ERROR_INVALID_METHOD
+<br>
+<span class="indent">The method specified by argument is not a valid jmethodID.</span>
+</p>
+
+<p>NCAI_ERROR_INVALID_LOCATION
+<br>
+<span class="indent">The location specified by argument is not a valid location.</span>
+</p>
+
+<p>NCAI_ERROR_INVALID_ADDRESS
+<br>
+<span class="indent">The address specified by argument is not valid.</span>
+</p>
+
+<p>NCAI_ERROR_INVALID_THREAD
+<br>
+<span class="indent">The thread specified by argument is not a valid ncaiThread.</span>
+</p>
+
+<p>NCAI_ERROR_THREAD_SUSPENDED
+<br>
+<span class="indent">The thread specified by argument is suspended.</span>
+</p>
+
+<p>NCAI_ERROR_THREAD_NOT_SUSPENDED
+<br>
+<span class="indent">The thread specified by argument is not suspended.</span>
+</p>
+
+<p>NCAI_ERROR_THREAD_NOT_ALIVE
+<br>
+<span class="indent">The thread specified by argument is not alive.</span>
+</p>
+
+<p>NCAI_ERROR_INTERPRETER_USED
+<br>
+<span class="indent">VM was started in interpreter mode.</span>
+</p>
+
+<p>NCAI_ERROR_NOT_COMPILED
+<br>
+<span class="indent">The method is not compiled yet.</span>
+</p>
+
+<p>NCAI_ERROR_DUPLICATE
+<br>
+<span class="indent">The designated breakpoint is already set.</span>
+</p>
+
+<p>NCAI_ERROR_NOT_FOUND
+<br>
+<span class="indent">The designated breakpoint is not found.</span>
+</p>
+
+
+
+<h1><a name="Priorities"></a>Appendix 1. Priorities</h1>
+
+<p>The following table reflects our view on implementation priorities.</p>
+
+<table width=450 border="1" bordercolor="#000000" cellpadding="3" cellspacing="0">
+    <col width="40%">
+    <col width="16%">
+    <col width="24%">
+    <col width="20%">
+    <tr>
+        <th class="TableHeading">
+            Function Name
+        <th class="TableHeading">
+            Priority
+        <th class="TableHeading">
+            Comments
+        <th class="TableHeading">
+            Capability
+    </tr>
+    <tr>
+        <td colspan="4">
+            <b>Modules</b>
+    </tr>
+    <tr>
+        <td><code>GetAllLoadedModules
+        <td>High
+        <td>
+        <td>Required
+    </tr>
+    <tr>
+        <td><code>GetModuleInfo
+        <td>High
+        <td>
+        <td>Required
+    </tr>
+    <tr>
+        <td><code>GetModuleClassLoader
+        <td>Low
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td colspan="4">
+            <b>Methods</b>
+    </tr>
+    <tr>
+        <td><code>IsMethodCompiled
+        <td>Medium
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td><code>GetMethodLocation
+        <td>Medium
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td><code>FindJavaMethod
+        <td>Medium
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td><code>GetBytecodeLocation
+        <td>Medium
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td><code>GetNativeLocation
+        <td>Medium
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td colspan="4">
+            <b>Threads</b>
+    </tr>
+    <tr>
+        <td><code>GetAllThreads
+        <td>High
+        <td>
+        <td>Required
+    </tr>
+    <tr>
+        <td><code>GetThreadInfo
+        <td>Medium
+        <td>
+        <td>Required
+    </tr>
+    <tr>
+        <td><code>GetThreadHandle
+        <td>Medium
+        <td>
+        <td>Required
+    </tr>
+    <tr>
+        <td><code>GetThreadObject
+        <td>Medium
+        <td>
+        <td>Required
+    </tr>
+    <tr>
+        <td><code>SuspendThread
+        <td>Medium
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td><code>ResumeThread
+        <td>High
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td><code>TerminateThread
+        <td>Low
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td><code>GetThreadState
+        <td>Medium
+        <td><i>TBD</i>
+        <td>Required
+    </tr>
+    <tr>
+        <td colspan="4">
+            <b>Frames</b>
+    </tr>
+    <tr>
+        <td><code>GetFrameCount
+        <td>High
+        <td>
+        <td>Required
+    </tr>
+    <tr>
+        <td><code>GetStackTrace
+        <td>High
+        <td>
+        <td>Required
+    </tr>
+    <tr>
+        <td colspan="4">
+            <b>Registers</b>
+    </tr>
+    <tr>
+        <td><code>GetRegisterCount
+        <td>Medium
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td><code>GetRegisterInfo
+        <td>Medium
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td><code>GetRegisterValue
+        <td>Medium
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td><code>SetRegisterValue
+        <td>Medium
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td colspan="4">
+            <b>Memory</b>
+    </tr>
+    <tr>
+        <td><code>ReadMemory
+        <td>High
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td><code>WriteMemory
+        <td>Medium
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td colspan="4">
+            <b>Signals</b>
+    </tr>
+    <tr>
+        <td><code>GetSignalCount
+        <td>Low
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td><code>GetSignalInfo
+        <td>Low
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td colspan="4">
+            <b>Miscellaneous</b>
+    </tr>
+    <tr>
+        <td><code>GetJvmtiEnv
+        <td>Low
+        <td>
+        <td>Required
+    </tr>
+    <tr>
+        <td><code>GetVersion
+        <td>Low
+        <td>
+        <td>Required
+    </tr>
+    <tr>
+        <td><code>GetErrorName
+        <td>Low
+        <td>
+        <td>Required
+    </tr>
+    <tr>
+        <td colspan="4">
+            <b>Capabilities</b>
+    </tr>
+    <tr>
+        <td><code>GetPotentialCapabilities
+        <td>Medium
+        <td><i>TBD</i>
+        <td>Required
+    </tr>
+    <tr>
+        <td><code>AddCapabilities
+        <td>Medium
+        <td><i>TBD</i>
+        <td>Required
+    </tr>
+    <tr>
+        <td><code>RelinquishCapabilities
+        <td>Medium
+        <td><i>TBD</i>
+        <td>Required
+    </tr>
+    <tr>
+        <td><code>GetCapabilities
+        <td>Medium
+        <td><i>TBD</i>
+        <td>Required
+    </tr>
+    <tr>
+        <td colspan="4">
+            <b>Event Management</b>
+    </tr>
+    <tr>
+        <td><code>GetEventCallbacks
+        <td>High
+        <td>
+        <td>Required
+    </tr>
+    <tr>
+        <td><code>SetEventCallbacks
+        <td>High
+        <td>
+        <td>Required
+    </tr>
+    <tr>
+        <td><code>SetEventNotificationMode
+        <td>High
+        <td>
+        <td>Required
+    </tr>
+    <tr>
+        <td><code>SetBreakpoint
+        <td>High
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td><code>ClearBreakpoint
+        <td>High
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td><code>SetWatchpoint
+        <td>Medium
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td><code>ClearWatchpoint
+        <td>Medium
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td><code>SetStepMode
+        <td>Medium
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td><code>NotifyFramePop
+        <td>Medium
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td colspan="4">
+            <b>Event Callbacks</b>
+    </tr>
+    <tr>
+        <td><code>ThreadStart
+        <td>Medium
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td><code>ThreadEnd
+        <td>Medium
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td><code>Step
+        <td>Medium
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td><code>Breakpoint
+        <td>High
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td><code>Watchpoint
+        <td>Medium
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td><code>Signal
+        <td>Medium
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td><code>Exception
+        <td>Low
+        <td><i>TBD</i>
+        <td>Optional
+    </tr>
+    <tr>
+        <td><code>ModuleLoad
+        <td>Medium
+        <td>
+        <td>Required
+    </tr>
+    <tr>
+        <td><code>ModuleUnload
+        <td>Medium
+        <td>
+        <td>Required
+    </tr>
+    <tr>
+        <td><code>MethodEntry
+        <td>Low
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td><code>MethodExit
+        <td>Low
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td><code>FramePop
+        <td>Low
+        <td>
+        <td>Optional
+    </tr>
+    <tr>
+        <td><code>ConsoleInput
+        <td>Low
+        <td><i>TBD</i>
+        <td>Optional
+    </tr>
+    <tr>
+        <td><code>ConsoleOutput
+        <td>Low
+        <td><i>TBD</i>
+        <td>Optional
+    </tr>
+    <tr>
+        <td><code>DebugMessage
+        <td>Low
+        <td><i>TBD</i>
+        <td>Optional
+    </tr>
+</table>
+
+
+</BODY>
+</HTML>
+</div>
+                            </div> <!-- top aka Main Content -->
+
+            <!-- FOOTER -->
+            <div id="pageFooter" class="special"><em>
+                Copyright &#169; 2003-2008, The Apache Software Foundation
+            </em></div>
+
+            <!-- Google analytics tracker code -->
+            <script
+                src="http://www.google-analytics.com/urchin.js"
+                type="text/javascript" />
+            <script type="text/javascript">
+              _uacct = "UA-1973333-3";
+              urchinTracker();
+            </script>
+        </body>
+    </html>
+<!-- end the processing -->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Propchange: harmony/standard/site/docs/subcomponents/drlvm/NCAI_spec.html
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: harmony/standard/site/docs/subcomponents/drlvm/index.html
URL: http://svn.apache.org/viewvc/harmony/standard/site/docs/subcomponents/drlvm/index.html?rev=655779&r1=655778&r2=655779&view=diff
==============================================================================
--- harmony/standard/site/docs/subcomponents/drlvm/index.html (original)
+++ harmony/standard/site/docs/subcomponents/drlvm/index.html Tue May 13 01:32:11 2008
@@ -351,6 +351,21 @@
                 gives info on specifics of the current implementation. 
               </li>
               </ul>
+            <li>
+              Native Code Access Interface (NCAI) Implementation
+            </li>
+            <ul>
+              <li>
+                <a href="NCAI.html">NCAI Implementation</a>
+                <br />
+                Details of NCAI implementation in DRLVM.
+              </li>
+              <li>
+                <a href="NCAI_spec.html">NCAI Description</a>
+                <br />
+                Description of NCAI interface partially implemented in DRLVM.
+              </li>
+            </ul>
           </ul>
           
         <li><a href="DoxygenStart.html">DRLVM Source Code Generated Documentation Index</a>

Modified: harmony/standard/site/xdocs/sitemap.xml
URL: http://svn.apache.org/viewvc/harmony/standard/site/xdocs/sitemap.xml?rev=655779&r1=655778&r2=655779&view=diff
==============================================================================
--- harmony/standard/site/xdocs/sitemap.xml (original)
+++ harmony/standard/site/xdocs/sitemap.xml Tue May 13 01:32:11 2008
@@ -312,6 +312,22 @@
 
                 <a href="subcomponents/drlvm/cp-verifier.html">Verifier</a>
               </li>
+
+              <li>
+
+                <a href="subcomponents/drlvm/NCAI.html">
+                  Native Code Access Interface (NCAI) implementation
+                </a>
+
+              <ul>
+                <li>
+                  <a href="subcomponents/drlvm/NCAI_spec.html">
+                    NCAI interface description
+                  </a>
+
+                </li>
+              </ul>
+              </li>
             </ul>
 
             <p>



Mime
View raw message