From 2f2fa6c0b102537d92a1148d8b00431077d5eb7a Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 21 Apr 2009 19:44:55 +0200 Subject: Add uprobes_ustack testcase and bug fixlet. * runtime/stack.c (_stp_stack_print): Use _stp_usymbol_print when tsk given. * testsuite/systemtap.base/uprobes_ustack.exp: New test file. * testsuite/systemtap.base/uprobes_ustack.stp: Likewise. --- testsuite/systemtap.base/uprobes_ustack.stp | 35 +++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 testsuite/systemtap.base/uprobes_ustack.stp (limited to 'testsuite/systemtap.base/uprobes_ustack.stp') diff --git a/testsuite/systemtap.base/uprobes_ustack.stp b/testsuite/systemtap.base/uprobes_ustack.stp new file mode 100644 index 00000000..6de03b42 --- /dev/null +++ b/testsuite/systemtap.base/uprobes_ustack.stp @@ -0,0 +1,35 @@ +// Prints backtrace from lib through exe twice using diffent ustack functions. + +global hits = 0; + +probe process("uprobes_exe").function("main_func") +{ + if (hits == 0) + { + log("print_ubacktrace exe 0"); + print_ubacktrace(); + hits++; + } + else if (hits == 1) + { + log("print_ustack exe 1"); + print_ustack(ubacktrace()); + hits++; + } +} + +probe process("libuprobes_lib.so").function("lib_func") +{ + if (hits == 2) + { + log("print_ubacktrace lib 2"); + print_ubacktrace(); + hits++; + } + else if (hits == 3) + { + log("print_ustack lib 3"); + print_ustack(ubacktrace()); + hits++; + } +} -- cgit