<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="IDATopLoop.html">
<link rel="next" href="JITRegion.html">
<link rel="Up" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="IDA" rel="Chapter" href="IDA.html">
<link title="IDAGraph" rel="Chapter" href="IDAGraph.html">
<link title="IDAHotKey" rel="Chapter" href="IDAHotKey.html">
<link title="IDATopLoop" rel="Chapter" href="IDATopLoop.html">
<link title="IDATrace" rel="Chapter" href="IDATrace.html">
<link title="JITRegion" rel="Chapter" href="JITRegion.html">
<link title="Z3" rel="Chapter" href="Z3.html">
<link title="IR" rel="Chapter" href="IR.html">
<link title="IRLocalOpt" rel="Chapter" href="IRLocalOpt.html">
<link title="IRTypeCheck" rel="Chapter" href="IRTypeCheck.html">
<link title="PpIR" rel="Chapter" href="PpIR.html">
<link title="X86" rel="Chapter" href="X86.html">
<link title="X86CFG" rel="Chapter" href="X86CFG.html">
<link title="X86Constraints" rel="Chapter" href="X86Constraints.html">
<link title="X86Decode" rel="Chapter" href="X86Decode.html">
<link title="X86Disasm" rel="Chapter" href="X86Disasm.html">
<link title="X86Encode" rel="Chapter" href="X86Encode.html">
<link title="X86InternalOperand" rel="Chapter" href="X86InternalOperand.html">
<link title="X86TypeCheck" rel="Chapter" href="X86TypeCheck.html">
<link title="X86Util" rel="Chapter" href="X86Util.html">
<link title="X86Random" rel="Chapter" href="X86Random.html">
<link title="X86ToIR" rel="Chapter" href="X86ToIR.html">
<link title="Z3SymbolicExecute" rel="Chapter" href="Z3SymbolicExecute.html">
<link title="ASMUtil" rel="Chapter" href="ASMUtil.html">
<link title="LowLevel" rel="Chapter" href="LowLevel.html"><link title="Types" rel="Section" href="#6_Types">
<title>IDATrace</title>
</head>
<body>
<div class="navbar"><a href="IDATopLoop.html">Previous</a>
&nbsp;<a href="index.html">Up</a>
&nbsp;<a href="JITRegion.html">Next</a>
</div>
<center><h1>Module <a href="type_IDATrace.html">IDATrace</a></h1></center>
<br>
<pre><span class="keyword">module</span> IDATrace: <code class="code">sig</code> <a href="IDATrace.html">..</a> <code class="code">end</code></pre>Module for tracing in IDA.  Call <a href="IDATrace.html#VALbegin_trace"><code class="code">IDATrace.begin_trace</code></a> with a tracer to begin 

    tracing.  The tracer can be of any data type.  The tracer function, 

    "<code class="code">process</code>" (horribly named, process_step maybe?), is called upon every 

    instruction executed.  If it returns false, no further steps are taken.  

    Otherwise, the debugger continues executing.

<p>

    Still haven't decided exactly what this module should look like; should there

    be an "<code class="code">initialize</code>" function?  Maybe objects works better here?  (Maybe not;

    can we interface with them in C?)<br>
<hr width="100%">
<br>
<span id="6_Types"><h6>Types</h6></span><br>
<br><code><span id="TYPEx86state"><span class="keyword">type</span> <code class="type"></code>x86state</span> = {</code><table class="typetable">
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>eax&nbsp;: <code class="type">int32</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>ecx&nbsp;: <code class="type">int32</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>edx&nbsp;: <code class="type">int32</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>ebx&nbsp;: <code class="type">int32</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>esp&nbsp;: <code class="type">int32</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>ebp&nbsp;: <code class="type">int32</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>esi&nbsp;: <code class="type">int32</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>edi&nbsp;: <code class="type">int32</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>cs&nbsp;: <code class="type">int32</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>ds&nbsp;: <code class="type">int32</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>es&nbsp;: <code class="type">int32</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>fs&nbsp;: <code class="type">int32</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>gs&nbsp;: <code class="type">int32</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>ss&nbsp;: <code class="type">int32</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>sf&nbsp;: <code class="type">bool</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>cf&nbsp;: <code class="type">bool</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>pf&nbsp;: <code class="type">bool</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>zf&nbsp;: <code class="type">bool</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>af&nbsp;: <code class="type">bool</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>ofl&nbsp;: <code class="type">bool</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>df&nbsp;: <code class="type">bool</code>;</code></td>

</tr></table>
}

<div class="info">
The register state of an X86 process<br>
</div>

<br><code><span id="TYPEtracer"><span class="keyword">type</span> <code class="type">'a</code> tracer</span> = {</code><table class="typetable">
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>obj&nbsp;: <code class="type">'a</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>process&nbsp;: <code class="type">'a -> int32 -> bool</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>initialize&nbsp;: <code class="type">'a -> <a href="IDATrace.html#TYPEx86state">x86state</a> -> unit</code>;</code></td>

</tr></table>
}

<div class="info">
Process tracing object.  See introductory remarks.<br>
</div>

<pre><span id="VALbegin_trace"><span class="keyword">val</span> begin_trace</span> : <code class="type">'a <a href="IDATrace.html#TYPEtracer">tracer</a> -> bool</code></pre><div class="info">
Given a tracer object, tries to begin tracing.  Returns success if tracing

    began.<br>
</div>
</body></html>