<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?> <!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=ANSI_X3.4-1968" /><title>Architecture Calls Out</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="index.html" title="The utrace User Debugging Infrastructure" /><link rel="up" href="ch04.html" title="Chapter 4. Kernel Internals" /><link rel="prev" href="re65.html" title="tracehook_notify_resume" /><link rel="next" href="re66.html" title="arch_has_single_step" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Architecture Calls Out</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="re65.html">Prev</a> </td><th width="60%" align="center">Chapter 4. Kernel Internals</th><td width="20%" align="right"> <a accesskey="n" href="re66.html">Next</a></td></tr></table><hr /></div><div class="sect1" title="Architecture Calls Out"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="arch"></a>Architecture Calls Out</h2></div></div></div><div class="toc"><dl><dt><span class="sect2"><a href="ch04s02.html#arch-ptrace"><code class="filename"><asm/ptrace.h></code></a></span></dt><dt><span class="sect2"><a href="ch04s02.html#arch-syscall"><code class="filename"><asm/syscall.h></code></a></span></dt><dt><span class="sect2"><a href="ch04s02.html#arch-tracehook"><code class="filename"><linux/tracehook.h></code></a></span></dt></dl></div><p> An arch that has done all these things sets <code class="constant">CONFIG_HAVE_ARCH_TRACEHOOK</code>. This is required to enable the <span class="application">utrace</span> code. </p><div class="sect2" title="<asm/ptrace.h>"><div class="titlepage"><div><div><h3 class="title"><a id="arch-ptrace"></a><code class="filename"><asm/ptrace.h></code></h3></div></div></div><div class="toc"><dl><dt><span class="refentrytitle"><a href="re66.html"><span>arch_has_single_step</span></a></span><span class="refpurpose"> — does this CPU support user-mode single-step? </span></dt><dt><span class="refentrytitle"><a href="re67.html"><span>arch_has_block_step</span></a></span><span class="refpurpose"> — does this CPU support user-mode block-step? </span></dt><dt><span class="refentrytitle"><a href="re68.html"><span>user_enable_single_step</span></a></span><span class="refpurpose"> — single-step in user-mode task </span></dt><dt><span class="refentrytitle"><a href="re69.html"><span>user_enable_block_step</span></a></span><span class="refpurpose"> — step until branch in user-mode task </span></dt><dt><span class="refentrytitle"><a href="re70.html"><span>user_disable_single_step</span></a></span><span class="refpurpose"> — cancel user-mode single-step </span></dt></dl></div><p> An arch defines these in <code class="filename"><asm/ptrace.h></code> if it supports hardware single-step or block-step features. </p></div><div class="sect2" title="<asm/syscall.h>"><div class="titlepage"><div><div><h3 class="title"><a id="arch-syscall"></a><code class="filename"><asm/syscall.h></code></h3></div></div></div><p> An arch provides <code class="filename"><asm/syscall.h></code> that defines these as inlines, or declares them as exported functions. These interfaces are described in <a class="xref" href="ch03s03.html" title="System Call Tracing">the section called “<code class="filename">System Call Tracing</code>”</a>. </p></div><div class="sect2" title="<linux/tracehook.h>"><div class="titlepage"><div><div><h3 class="title"><a id="arch-tracehook"></a><code class="filename"><linux/tracehook.h></code></h3></div></div></div><p> An arch must define <code class="constant">TIF_NOTIFY_RESUME</code> and <code class="constant">TIF_SYSCALL_TRACE</code> in its <code class="filename"><asm/thread_info.h></code>. The arch code must call the following functions, all declared in <code class="filename"><linux/tracehook.h></code> and described in <a class="xref" href="ch04.html#tracehook" title="Core Calls In">the section called “Core Calls In”</a>: </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><code class="function">tracehook_notify_resume</code></p></li><li class="listitem"><p><code class="function">tracehook_report_syscall_entry</code></p></li><li class="listitem"><p><code class="function">tracehook_report_syscall_exit</code></p></li><li class="listitem"><p><code class="function">tracehook_signal_handler</code></p></li></ul></div><p> </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="re65.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch04.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="re66.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span>tracehook_notify_resume</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span>arch_has_single_step</span></td></tr></table></div></body></html>