Debian Codegraph @

testsuite/semok/autocast10.stp

raw
1 #!/bin/bash
2 //bin/true && exec stap -p2 --disable-cache $0 "$@"
3
4 // The --disable-cache above is to make sure we're using the same generated
5 // @cast module for both -- so even when we have to make it, it's still reused
6 // in a given session. (see also semok/autocast06.stp)
7
8 probe begin
9 {
10 // Test multiple DWARF assignments to a local can propagate types if
11 // they're the same underneath.
12 if (randint(2))
13 sun = & @cast(0, "sockaddr_un", "<sys/un.h>");
14 else
15 sun = & @cast(1, "sockaddr_un", "<sys/un.h>");
16 println(sun->sun_family)
17 }
18