blob: a15f911a180458b90fbb35c08c1ce0ff709d7c61 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/usr/bin/env ktap
#Only can run it in x86_64
#
#Register follow x86_64 call conversion:
#
#x86_64:
# %rcx 4 argument
# %rdx 3 argument
# %rsi 2 argument
# %rdi 1 argument
trace probe:do_sys_open dfd=%di filename=%si flags=%dx mode=%cx {
printf("[do_sys_open entry]: (%s) open file (%s)\n",
execname(), user_string(arg3))
}
trace probe:do_sys_open%return fd=$retval {
printf("[do_sys_open exit]: return fd (%d)\n", arg3)
}
|