testsuite/semok/bz11911.stp
raw| 1 | #!/bin/sh |
| 2 | |
| 3 | TESTBIN=`mktemp` || exit $? |
| 4 | function clean_exit { rm $TESTBIN; exit $1; } |
| 5 | |
| 6 | echo ' |
| 7 | struct point { int x, y; }; |
| 8 | |
| 9 | int |
| 10 | foo (struct point p, int i) |
| 11 | { |
| 12 | return p.x + p.y; |
| 13 | } |
| 14 | |
| 15 | int |
| 16 | main (void) |
| 17 | { |
| 18 | struct point p = { 2, 3 }; |
| 19 | return foo (p, 17); |
| 20 | } |
| 21 | ' | gcc -g -o $TESTBIN -xc - || clean_exit $? |
| 22 | |
| 23 | stap $@ -L 'process("'$TESTBIN'").function("foo")' | grep '\$p:struct point' |
| 24 | clean_exit $? |