summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.base/const_value_func.c
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2009-10-06 15:22:21 +0200
committerMark Wielaard <mjw@redhat.com>2009-10-06 15:22:21 +0200
commit5aa987f2edc5c60b61d66fc0e5b7e0fb33423586 (patch)
treeca85daf49c52fb8dea0e605a5fe22ce0eb9d6f96 /testsuite/systemtap.base/const_value_func.c
parent6b517475576ac5f2209e5231d14d0b8aa0b6a4d5 (diff)
downloadsystemtap-steved-5aa987f2edc5c60b61d66fc0e5b7e0fb33423586.tar.gz
systemtap-steved-5aa987f2edc5c60b61d66fc0e5b7e0fb33423586.tar.xz
systemtap-steved-5aa987f2edc5c60b61d66fc0e5b7e0fb33423586.zip
PR10739 testcase. Split const_value test in two. Absolute const addr fails.
* testsuite/systemtap.base/const_value.exp: Handle both const_value blocks and address separately. XFAIL second test as PR10739. * testsuite/systemtap.base/const_value.stp: Only query baz const value. * testsuite/systemtap.base/const_value_func.c: New test for bar address. * testsuite/systemtap.base/const_value_func.stp: Likewise.
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;
+}