doc/SystemTap_Beginners_Guide/testsuite/systemtap.base/statement.c
raw| 1 | #include <stdio.h> |
| 2 | |
| 3 | int foo(int a) |
| 4 | { |
| 5 | int b = 2; |
| 6 | return b + a * 3; |
| 7 | } |
| 8 | |
| 9 | void bar(int b) { b += 2; printf("single line! %d\n", b); } |
| 10 | |
| 11 | int main(int argc, char** argv) |
| 12 | { // NB: for GCC < 4.4, decl_line is at '{', not where the identifier is |
| 13 | if (argc != 1) |
| 14 | return 42; |
| 15 | // NB: [email protected]+4 lands here for GCC >= 4.4 |
| 16 | // NB: [email protected]+4 lands here for GCC < 4.4 |
| 17 | foo(argv[0][0]); bar(argv[0][1]); return 0; } |