summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.base/const_value_func.c
diff options
context:
space:
mode:
authorTim Moore <timoore@redhat.com>2009-10-07 20:10:17 +0200
committerTim Moore <timoore@redhat.com>2009-10-07 20:10:17 +0200
commite6638df404688a1af5e9713befc298984241af5b (patch)
treea3684cfc7825e9079a021a38732e5d4ce4260c1c /testsuite/systemtap.base/const_value_func.c
parent9ed28fbc61420dbcfe46828fe5ee35eae3f4dc79 (diff)
parent038c38c6119e29189be83c3a214c635c0d02ee58 (diff)
downloadsystemtap-steved-e6638df404688a1af5e9713befc298984241af5b.tar.gz
systemtap-steved-e6638df404688a1af5e9713befc298984241af5b.tar.xz
systemtap-steved-e6638df404688a1af5e9713befc298984241af5b.zip
Merge commit 'origin/master'
Diffstat (limited to 'testsuite/systemtap.base/const_value_func.c')
-rw-r--r--testsuite/systemtap.base/const_value_func.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/testsuite/systemtap.base/const_value_func.c b/testsuite/systemtap.base/const_value_func.c
new file mode 100644
index 00000000..23f2f0bc
--- /dev/null
+++ b/testsuite/systemtap.base/const_value_func.c
@@ -0,0 +1,22 @@
+#include "sdt.h"
+
+static int
+bar (int i, long j)
+{
+ return i * j;
+}
+
+static int
+func (int (*f) ())
+{
+ volatile int i = 2;
+ volatile long j = 21;
+ STAP_PROBE (test, constvalues);
+ return f(i, j);
+}
+
+int
+main (int argc, char *argv[], char *envp[])
+{
+ return func (&bar) - 42;
+}