summaryrefslogtreecommitdiffstats
path: root/tapset/ucontext-symbols.stp
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2009-04-21 20:01:00 +0200
committerMark Wielaard <mjw@redhat.com>2009-04-21 20:01:00 +0200
commit192d5136bbfcd1e61c2f17cc52df875a954d24ec (patch)
tree27dd76c7386e5b8d177756ad8175e5b700f8541a /tapset/ucontext-symbols.stp
parent41d9243cc9d107d1980e18537090ed358dc7920a (diff)
parent7d7f074398802c84f544e263995ce15874b9f408 (diff)
downloadsystemtap-steved-192d5136bbfcd1e61c2f17cc52df875a954d24ec.tar.gz
systemtap-steved-192d5136bbfcd1e61c2f17cc52df875a954d24ec.tar.xz
systemtap-steved-192d5136bbfcd1e61c2f17cc52df875a954d24ec.zip
Merge branch 'user_unwind'
Diffstat (limited to 'tapset/ucontext-symbols.stp')
-rw-r--r--tapset/ucontext-symbols.stp27
1 files changed, 25 insertions, 2 deletions
diff --git a/tapset/ucontext-symbols.stp b/tapset/ucontext-symbols.stp
index 3813a8bf..5502f5cd 100644
--- a/tapset/ucontext-symbols.stp
+++ b/tapset/ucontext-symbols.stp
@@ -23,7 +23,7 @@
%}
/**
- * sfunction usymname - Return the symbol of an address in the current task.
+ * sfunction usymname - Return the symbol of an address in the current task. EXPERIMENTAL!
* @addr: The address to translate.
*
* Description: Returns the (function) symbol name associated with the
@@ -36,7 +36,7 @@ function usymname:string (addr: long) %{ /* pure */
%}
/**
- * sfunction usymdata - Return the symbol and module offset of an address.
+ * sfunction usymdata - Return the symbol and module offset of an address. EXPERIMENTAL!
* @addr: The address to translate.
*
* Description: Returns the (function) symbol name associated with the
@@ -50,3 +50,26 @@ function usymdata:string (addr: long) %{ /* pure */
_stp_symbol_snprint(THIS->__retvalue, MAXSTRINGLEN, THIS->addr,
current, 1);
%}
+
+/**
+ * sfunction print_ustack - Print out stack for the current task from string. EXPERIMENTAL!
+ * @stk: String with list of hexidecimal addresses for the current task.
+ *
+ * Perform a symbolic lookup of the addresses in the given string,
+ * which is assumed to be the result of a prior call to
+ * <command>ubacktrace()</command> for the current task.
+ *
+ * Print one line per address, including the address, the
+ * name of the function containing the address, and an estimate of
+ * its position within that function. Return nothing.
+ */
+function print_ustack(stk:string) %{
+ char *ptr = THIS->stk;
+ char *tok = strsep(&ptr, " ");
+ while (tok && *tok) {
+ _stp_print_char(' ');
+ _stp_usymbol_print (simple_strtol(tok, NULL, 16), current);
+ _stp_print_char('\n');
+ tok = strsep(&ptr, " ");
+ }
+%}