From 655ee2825121e149a9976e562946892efb20aea1 Mon Sep 17 00:00:00 2001 From: hunt Date: Thu, 7 Apr 2005 21:48:47 +0000 Subject: *** empty log message *** --- runtime/docs/html/sym_8c-source.html | 98 +++++++++++++++++++----------------- 1 file changed, 52 insertions(+), 46 deletions(-) (limited to 'runtime/docs/html/sym_8c-source.html') 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 @@ -
Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages
+
Main Page | Modules | Directories | File List | Globals | Related Pages

sym.c

00001 #ifndef _SYM_C_ /* -*- linux-c -*- */
 00002 #define _SYM_C_
 00003 
-00004 #include "scbuf.c"
+00004 #include "string.c"
 00005 
 00006 /** @file sym.c
 00007  * @addtogroup sym Symbolic Functions
@@ -26,48 +26,54 @@
 00019                             unsigned long *offset,
 00020                             char **modname, char *namebuf)=(void *)KALLSYMS_LOOKUP;
 00021 
-00022 static void __stp_symbol_print (unsigned long address, void (*prtfunc)(const char *fmt, ...))
-00023 {
-00024         char *modname;
-00025         const char *name;
-00026         unsigned long offset, size;
-00027         char namebuf[KSYM_NAME_LEN+1];
-00028 
-00029         name = _stp_kallsyms_lookup(address, &size, &offset, &modname, namebuf);
-00030 
-00031         (*prtfunc)("0x%lx : ", address);
-00032         if (modname)
-00033                 (*prtfunc)("%s+%#lx/%#lx [%s]", name, offset, size, modname);
-00034         else
-00035                 (*prtfunc)("%s+%#lx/%#lx", name, offset, size);
-00036 }
-00037 
-00038 /** Print addresses symbolically into a string
-00039  * @param address The address to lookup.
-00040  * @note Symbolic lookups should not be done within
-00041  * a probe because it is too time-consuming. Use at module exit time.
-00042  * @note Uses scbuf.
-00043  */
-00044 
-00045 char * _stp_symbol_sprint (unsigned long address)
-00046 { 
-00047         char *ptr = _stp_scbuf_cur();
-00048         __stp_symbol_print (address, _stp_sprint);
-00049         return ptr;
-00050 }
-00051 
-00052 
-00053 /** Print addresses symbolically to the trace buffer.
-00054  * @param address The address to lookup.
-00055  * @note Symbolic lookups should not be done within
-00056  * a probe because it is too time-consuming. Use at module exit time.
-00057  */
-00058 
-00059 void _stp_symbol_print (unsigned long address)
-00060 {
-00061         __stp_symbol_print (address, _stp_print);
-00062 }
-00063 
-00064 /** @} */
-00065 #endif /* _SYM_C_ */
+00022 
+00023 /** Write addresses symbolically into a String
+00024  * @param str String
+00025  * @param address The address to lookup.
+00026  * @note Symbolic lookups should not normally be done within
+00027  * a probe because it is too time-consuming. Use at module exit time.
+00028  */
+00029 
+00030 String _stp_symbol_sprint (String str, unsigned long address)
+00031 { 
+00032         char *modname;
+00033         const char *name;
+00034         unsigned long offset, size;
+00035         char namebuf[KSYM_NAME_LEN+1];
+00036 
+00037         name = _stp_kallsyms_lookup(address, &size, &offset, &modname, namebuf);
+00038 
+00039         _stp_sprintf (str, "0x%lx : ", address);
+00040         if (modname)
+00041                 _stp_sprintf (str, "%s+%#lx/%#lx [%s]", name, offset, size, modname);
+00042         else
+00043                 _stp_sprintf (str, "%s+%#lx/%#lx", name, offset, size);
+00044         return str;
+00045 }
+00046 
+00047 
+00048 /** Print addresses symbolically to the print buffer.
+00049  * @param address The address to lookup.
+00050  * @note Symbolic lookups should not normally be done within
+00051  * a probe because it is too time-consuming. Use at module exit time.
+00052  */
+00053 
+00054 void _stp_symbol_print (unsigned long address)
+00055 {
+00056         char *modname;
+00057         const char *name;
+00058         unsigned long offset, size;
+00059         char namebuf[KSYM_NAME_LEN+1];
+00060 
+00061         name = _stp_kallsyms_lookup(address, &size, &offset, &modname, namebuf);
+00062 
+00063         _stp_printf ("0x%lx : ", address);
+00064         if (modname)
+00065                 _stp_printf ("%s+%#lx/%#lx [%s]", name, offset, size, modname);
+00066         else
+00067                 _stp_printf ("%s+%#lx/%#lx", name, offset, size);
+00068 }
+00069 
+00070 /** @} */
+00071 #endif /* _SYM_C_ */
 
-- cgit