diff options
Diffstat (limited to 'testsuite/systemtap.context/backtrace.stp')
-rw-r--r-- | testsuite/systemtap.context/backtrace.stp | 24 |
1 files changed, 24 insertions, 0 deletions
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() +} + + |