diff options
Diffstat (limited to 'runtime/docs/html/sym_8c-source.html')
-rw-r--r-- | runtime/docs/html/sym_8c-source.html | 98 |
1 files changed, 52 insertions, 46 deletions
diff --git a/runtime/docs/html/sym_8c-source.html b/runtime/docs/html/sym_8c-source.html index 2e8ffc8a..8e7f21b8 100644 --- a/runtime/docs/html/sym_8c-source.html +++ b/runtime/docs/html/sym_8c-source.html @@ -4,11 +4,11 @@ <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.1 --> -<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></div> +<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></div> <h1>sym.c</h1><div class="fragment"><pre class="fragment">00001 <span class="preprocessor">#ifndef _SYM_C_ </span><span class="comment">/* -*- linux-c -*- */</span> 00002 <span class="preprocessor">#define _SYM_C_</span> 00003 <span class="preprocessor"></span> -00004 <span class="preprocessor">#include "scbuf.c"</span> +00004 <span class="preprocessor">#include "<a class="code" href="string_8c.html">string.c</a>"</span> 00005 <span class="comment"></span> 00006 <span class="comment">/** @file sym.c</span> 00007 <span class="comment"> * @addtogroup sym Symbolic Functions</span> @@ -26,48 +26,54 @@ 00019 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> *offset, 00020 <span class="keywordtype">char</span> **modname, <span class="keywordtype">char</span> *namebuf)=(<span class="keywordtype">void</span> *)KALLSYMS_LOOKUP; 00021 -00022 <span class="keyword">static</span> <span class="keywordtype">void</span> __stp_symbol_print (<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> address, <span class="keywordtype">void</span> (*prtfunc)(<span class="keyword">const</span> <span class="keywordtype">char</span> *fmt, ...)) -00023 { -00024 <span class="keywordtype">char</span> *modname; -00025 <span class="keyword">const</span> <span class="keywordtype">char</span> *name; -00026 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> offset, size; -00027 <span class="keywordtype">char</span> namebuf[KSYM_NAME_LEN+1]; -00028 -00029 name = _stp_kallsyms_lookup(address, &size, &offset, &modname, namebuf); -00030 -00031 (*prtfunc)(<span class="stringliteral">"0x%lx : "</span>, address); -00032 <span class="keywordflow">if</span> (modname) -00033 (*prtfunc)(<span class="stringliteral">"%s+%#lx/%#lx [%s]"</span>, name, offset, size, modname); -00034 <span class="keywordflow">else</span> -00035 (*prtfunc)(<span class="stringliteral">"%s+%#lx/%#lx"</span>, name, offset, size); -00036 } -00037 <span class="comment"></span> -00038 <span class="comment">/** Print addresses symbolically into a string</span> -00039 <span class="comment"> * @param address The address to lookup.</span> -00040 <span class="comment"> * @note Symbolic lookups should not be done within</span> -00041 <span class="comment"> * a probe because it is too time-consuming. Use at module exit time.</span> -00042 <span class="comment"> * @note Uses scbuf.</span> -00043 <span class="comment"> */</span> -00044 -<a name="l00045"></a><a class="code" href="group__sym.html#ga2">00045</a> <span class="keywordtype">char</span> * <a class="code" href="group__sym.html#ga2">_stp_symbol_sprint</a> (<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> address) -00046 { -00047 <span class="keywordtype">char</span> *ptr = _stp_scbuf_cur(); -00048 __stp_symbol_print (address, <a class="code" href="group__scbuf.html#ga2">_stp_sprint</a>); -00049 <span class="keywordflow">return</span> ptr; -00050 } -00051 -00052 <span class="comment"></span> -00053 <span class="comment">/** Print addresses symbolically to the trace buffer.</span> -00054 <span class="comment"> * @param address The address to lookup.</span> -00055 <span class="comment"> * @note Symbolic lookups should not be done within</span> -00056 <span class="comment"> * a probe because it is too time-consuming. Use at module exit time.</span> -00057 <span class="comment"> */</span> -00058 -<a name="l00059"></a><a class="code" href="group__sym.html#ga3">00059</a> <span class="keywordtype">void</span> <a class="code" href="group__sym.html#ga3">_stp_symbol_print</a> (<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> address) -00060 { -00061 __stp_symbol_print (address, <a class="code" href="group__io.html#ga1">_stp_print</a>); -00062 } -00063 <span class="comment"></span> -00064 <span class="comment">/** @} */</span> -00065 <span class="preprocessor">#endif </span><span class="comment">/* _SYM_C_ */</span> +00022 <span class="comment"></span> +00023 <span class="comment">/** Write addresses symbolically into a String</span> +00024 <span class="comment"> * @param str String</span> +00025 <span class="comment"> * @param address The address to lookup.</span> +00026 <span class="comment"> * @note Symbolic lookups should not normally be done within</span> +00027 <span class="comment"> * a probe because it is too time-consuming. Use at module exit time.</span> +00028 <span class="comment"> */</span> +00029 +<a name="l00030"></a><a class="code" href="group__sym.html#ga1">00030</a> String <a class="code" href="group__sym.html#ga1">_stp_symbol_sprint</a> (String str, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> address) +00031 { +00032 <span class="keywordtype">char</span> *modname; +00033 <span class="keyword">const</span> <span class="keywordtype">char</span> *name; +00034 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> offset, size; +00035 <span class="keywordtype">char</span> namebuf[KSYM_NAME_LEN+1]; +00036 +00037 name = _stp_kallsyms_lookup(address, &size, &offset, &modname, namebuf); +00038 +00039 <a class="code" href="group__string.html#ga3">_stp_sprintf</a> (str, <span class="stringliteral">"0x%lx : "</span>, address); +00040 <span class="keywordflow">if</span> (modname) +00041 <a class="code" href="group__string.html#ga3">_stp_sprintf</a> (str, <span class="stringliteral">"%s+%#lx/%#lx [%s]"</span>, name, offset, size, modname); +00042 <span class="keywordflow">else</span> +00043 <a class="code" href="group__string.html#ga3">_stp_sprintf</a> (str, <span class="stringliteral">"%s+%#lx/%#lx"</span>, name, offset, size); +00044 <span class="keywordflow">return</span> str; +00045 } +00046 +00047 <span class="comment"></span> +00048 <span class="comment">/** Print addresses symbolically to the print buffer.</span> +00049 <span class="comment"> * @param address The address to lookup.</span> +00050 <span class="comment"> * @note Symbolic lookups should not normally be done within</span> +00051 <span class="comment"> * a probe because it is too time-consuming. Use at module exit time.</span> +00052 <span class="comment"> */</span> +00053 +<a name="l00054"></a><a class="code" href="group__sym.html#ga2">00054</a> <span class="keywordtype">void</span> <a class="code" href="group__sym.html#ga2">_stp_symbol_print</a> (<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> address) +00055 { +00056 <span class="keywordtype">char</span> *modname; +00057 <span class="keyword">const</span> <span class="keywordtype">char</span> *name; +00058 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> offset, size; +00059 <span class="keywordtype">char</span> namebuf[KSYM_NAME_LEN+1]; +00060 +00061 name = _stp_kallsyms_lookup(address, &size, &offset, &modname, namebuf); +00062 +00063 <a class="code" href="group__print.html#ga3">_stp_printf</a> (<span class="stringliteral">"0x%lx : "</span>, address); +00064 <span class="keywordflow">if</span> (modname) +00065 <a class="code" href="group__print.html#ga3">_stp_printf</a> (<span class="stringliteral">"%s+%#lx/%#lx [%s]"</span>, name, offset, size, modname); +00066 <span class="keywordflow">else</span> +00067 <a class="code" href="group__print.html#ga3">_stp_printf</a> (<span class="stringliteral">"%s+%#lx/%#lx"</span>, name, offset, size); +00068 } +00069 <span class="comment"></span> +00070 <span class="comment">/** @} */</span> +00071 <span class="preprocessor">#endif </span><span class="comment">/* _SYM_C_ */</span> </pre></div></body></html> |