summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.base/externalvar.stp
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/systemtap.base/externalvar.stp')
-rw-r--r--testsuite/systemtap.base/externalvar.stp39
1 files changed, 39 insertions, 0 deletions
diff --git a/testsuite/systemtap.base/externalvar.stp b/testsuite/systemtap.base/externalvar.stp
new file mode 100644
index 00000000..7d4b69bb
--- /dev/null
+++ b/testsuite/systemtap.base/externalvar.stp
@@ -0,0 +1,39 @@
+probe process("externalvar").function("main_call")
+{
+ printf("exevar_c = %d\n", $exevar_c);
+ printf("exevar_i = %d\n", $exevar_i);
+ printf("exevar_l = %d\n", $exevar_l);
+
+ printf("exe_s->i = %d\n", $exe_s->i);
+ printf("exe_s->l = %d\n", $exe_s->l);
+ printf("exe_s->c = %d\n", $exe_s->c);
+
+ printf("exe_s->s1 = 0x%x\n", $exe_s->s1);
+ if ($exe_s == $exe_s->s2)
+ {
+ printf("exe_s == exe_s->s2\n");
+ }
+ else
+ {
+ printf("exe_s != exe_s->s2\n");
+ }
+}
+
+probe process("libexternalvar.so").function("lib_call")
+{
+ printf("libvar = %d\n", $libvar);
+
+ printf("lib_s->i = %d\n", $lib_s->i);
+ printf("lib_s->l = %d\n", $lib_s->l);
+ printf("lib_s->c = %d\n", $lib_s->c);
+
+ if ($lib_s == $lib_s->s1)
+ {
+ printf("lib_s == lib_s->s1\n");
+ }
+ else
+ {
+ printf("lib_s != lib_s->s2\n");
+ }
+ printf("lib_s->s2 = 0x%x\n", $lib_s->s2);
+}