Debian Codegraph @

doc/SystemTap_Beginners_Guide/testsuite/systemtap.bpf/asm_tests/string-basic.stp

raw
1 /* PR23816: narrowing down a bug that turned out unrelated to assembly */
2 function foo:string() %{ /* bpf */ /* pure */
3 0xbf, $$, "test", -, -;
4 %}
5
6 probe begin {
7 printf("U %s %s\n", foo(), "test"/*bar (5)*/)
8 }
9
10 probe kernel.function("vfs_read") {
11 printf("K 1 %s\n", foo()) // <- this worked
12 printf("K 2 %s\n", "test") // <- this worked
13 printf("K 3 %s %s\n", foo(), "test") // <- this didn't
14 printf("K 4 %s %s\n", "test", "test") // <- this didn't
15 printf("K 5 %s %s\n", foo(), foo()) // <- this didn't
16 printf("K 6 %s", "test") printf(" %s\n", "test") // <- this did
17 printf("K %d %s\n", 7, "test") // <- this did
18 exit()
19 }