testsuite/semko/autocast03.stp
raw| 1 | #! stap -p2 |
| 2 | |
| 3 | probe begin |
| 4 | { |
| 5 | // Test DWARF through a ternary expression, with mismatched types. |
| 6 | // (These are actually the same, but coming from different cast modules.) |
| 7 | println( (randint(2) |
| 8 | ? & @cast(0, "sockaddr_un", "<sys/un.h>") |
| 9 | : & @cast(0, "sockaddr_un", "<sys/socket.h><sys/un.h>") |
| 10 | ) -> sun_family ) |
| 11 | } |