From 81bceb41bf645dbef2ec8fe1522ad1b68a02d17d Mon Sep 17 00:00:00 2001 From: hunt Date: Mon, 2 Jul 2007 07:22:21 +0000 Subject: 2007-07-02 Martin Hunt * systemtap.context/*: New context tests. --- testsuite/systemtap.context/backtrace.stp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 testsuite/systemtap.context/backtrace.stp (limited to 'testsuite/systemtap.context/backtrace.stp') diff --git a/testsuite/systemtap.context/backtrace.stp b/testsuite/systemtap.context/backtrace.stp new file mode 100644 index 00000000..8f02c174 --- /dev/null +++ b/testsuite/systemtap.context/backtrace.stp @@ -0,0 +1,24 @@ +function print_all_trace_info() { + printf("backtrace from %s:\n", pp()) + print_backtrace() + print("--------\n") + bt = backtrace() + printf("the stack is %s\n", bt) + print("--------\n") + print_stack(bt); + print("--------\n") +} + +probe begin { + print_backtrace() +} + +probe end { + print_backtrace() +} + +probe module("systemtap_test_module2").function("yyy_func3") { + print_all_trace_info() +} + + -- cgit