Debian Codegraph @

testsuite/semok/autocast13.stp

raw
1 #! stap -p2
2
3 function sockaddr_un(ptr)
4 {
5 // Make sure multiple returns still resolve the function to a rich type
6 if (randint(2))
7 return & @cast(ptr, "sockaddr_un", "<sys/un.h>")
8 else
9 return & @cast(0xc0ffee, "sockaddr_un", "<sys/un.h>")
10 }
11
12 probe begin
13 {
14 // Test DWARF types returned from function calls
15 println( sockaddr_un(0) -> sun_family )
16 }