From d950d08e6f21c19fa63a4435fd7071fe02c66745 Mon Sep 17 00:00:00 2001 From: jistone Date: Fri, 22 Dec 2006 22:18:02 +0000 Subject: 2006-12-22 Josh Stone * stap.1.in: Document how to specify the size of global arrays. testsuite/ * buildok/array_size.stp, parseko/array01.stp, parseko/array02.stp, parseko/array03.stp, parseko/array04.stp, transko/array01.stp, systemtap.base/array_size.exp, systemtap.base/array_size.stp: Tests for specifying the size of global arrays. --- testsuite/buildok/array_size.stp | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 testsuite/buildok/array_size.stp (limited to 'testsuite/buildok') diff --git a/testsuite/buildok/array_size.stp b/testsuite/buildok/array_size.stp new file mode 100755 index 00000000..44a5e58c --- /dev/null +++ b/testsuite/buildok/array_size.stp @@ -0,0 +1,11 @@ +#! stap -p4 + +# test reading & writing for little, big, and default arrays, with various +# index types mixed in. +global a[1], b[100000], c +probe begin { + a[42, "foobar"] = "Hello World!" + b["foo", "bar", "baz", 42] = 314159265 + c[42] = 161803399 + printf("%s %d %d\n", a[42, "foobar"], b["foo", "bar", "baz", 42], c[42]) +} -- cgit