Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 21b744155c03a240ef0ea458aef35c9d > files > 774

systemtap-client-2.2.1-1.fc18.i686.rpm

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>4.2. Accessing User-Space Target Variables</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta name="generator" content="publican 2.8" /><meta name="package" content="Systemtap-SystemTap_Beginners_Guide-2.2.1-en-US-2.2.1-2" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="userspace-probing.html" title="Chapter 4. User-Space Probing" /><link rel="prev" href="userspace-probing.html" title="Chapter 4. User-Space Probing" /><link rel="next" href="ustack.html" title="4.3. User-Space Stack Backtraces" /></head><body><p id="title"><a class="left" href="http://www.fedoraproject.org"><img src="Common_Content/images/image_left.png" alt="Product Site" /></a><a class="right" href="http://docs.fedoraproject.org"><img src="Common_Content/images/image_right.png" alt="Documentation Site" /></a></p><ul class="docnav"><li class="previous"><a accesskey="p" href="userspace-probing.html"><strong>Prev</strong></a></li><li class="next"><a accesskey="n" href="ustack.html"><strong>Next</strong></a></li></ul><div class="section" id="utargetvariable"><div class="titlepage"><div><div keep-together.within-column="always"><h2 class="title">4.2. Accessing User-Space Target Variables</h2></div></div></div><a id="idp211455836" class="indexterm"></a><div class="para">
			User-space target variables can be accessed in the same manner as described in <a class="xref" href="targetvariables.html">Section 3.3.2, “Target Variables”</a>. However, in Linux there are separate address spaces for the user and kernel code. When using "-&gt;" operator SystemTap will access the appropriate address space. For pointers to base types such as integers and strings there are a number of functions listed below to access user-space data. The first argument for each functions is the pointer to the data item.
		</div><div class="variablelist"><dl class="variablelist"><dt class="varlistentry"><span class="term">user_char(<em class="replaceable"><code>address</code></em>)</span></dt><dd><div class="para">
						Obtain the character at <em class="replaceable"><code>address</code></em> for the current user process.
					</div></dd><dt class="varlistentry"><span class="term">user_short(<em class="replaceable"><code>address</code></em>)</span></dt><dd><div class="para">
						Obtain the short at <em class="replaceable"><code>address</code></em> for the current user process.
					</div></dd><dt class="varlistentry"><span class="term">user_int(<em class="replaceable"><code>address</code></em>)</span></dt><dd><div class="para">
						Obtain the int at <em class="replaceable"><code>address</code></em> for the current user process.
					</div></dd><dt class="varlistentry"><span class="term">user_long(<em class="replaceable"><code>address</code></em>)</span></dt><dd><div class="para">
						Obtain the long at <em class="replaceable"><code>address</code></em> for the current user process.
					</div></dd><dt class="varlistentry"><span class="term">user_string(<em class="replaceable"><code>address</code></em>)</span></dt><dd><div class="para">
						Obtain the string at <em class="replaceable"><code>address</code></em> for the current user process.
					</div></dd><dt class="varlistentry"><span class="term">user_string_n(<em class="replaceable"><code>address</code></em>, <em class="replaceable"><code>n</code></em>)</span></dt><dd><div class="para">
						Obtain the string at <em class="replaceable"><code>address</code></em> for the current user process and limits the string to <em class="replaceable"><code>n</code></em> bytes.
					</div></dd></dl></div></div><ul class="docnav"><li class="previous"><a accesskey="p" href="userspace-probing.html"><strong>Prev</strong>Chapter 4. User-Space Probing</a></li><li class="up"><a accesskey="u" href="#"><strong>Up</strong></a></li><li class="home"><a accesskey="h" href="index.html"><strong>Home</strong></a></li><li class="next"><a accesskey="n" href="ustack.html"><strong>Next</strong>4.3. User-Space Stack Backtraces</a></li></ul></body></html>