summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.context/backtrace.stp
diff options
context:
space:
mode:
authorhunt <hunt>2007-07-02 07:22:21 +0000
committerhunt <hunt>2007-07-02 07:22:21 +0000
commit81bceb41bf645dbef2ec8fe1522ad1b68a02d17d (patch)
tree9956ad4f6bc5122387a040adb442032cb752aecd /testsuite/systemtap.context/backtrace.stp
parenta147cc55c352fecdfe6835af8100403594b79dad (diff)
downloadsystemtap-steved-81bceb41bf645dbef2ec8fe1522ad1b68a02d17d.tar.gz
systemtap-steved-81bceb41bf645dbef2ec8fe1522ad1b68a02d17d.tar.xz
systemtap-steved-81bceb41bf645dbef2ec8fe1522ad1b68a02d17d.zip
2007-07-02 Martin Hunt <hunt@redhat.com>
* systemtap.context/*: New context tests.
Diffstat (limited to 'testsuite/systemtap.context/backtrace.stp')
-rw-r--r--testsuite/systemtap.context/backtrace.stp24
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()
+}
+
+