Debian Codegraph @

tapset/linux/arm/aux_syscalls.stp

raw
1 # arch-specific requests of ptrace ___________________________
2 #
3
4 %{
5 // Get _stp_val_array and _stp_lookup_* definitions.
6 #include "linux/syscalls-common.h"
7 #include <asm/ptrace.h>
8 static const _stp_val_array _stp_arch_ptrace_request_list[] = {
9 V(PTRACE_GETREGS),
10 V(PTRACE_SETREGS),
11 V(PTRACE_GETFPREGS),
12 V(PTRACE_SETFPREGS),
13 V(PTRACE_GETWMMXREGS),
14 V(PTRACE_SETWMMXREGS),
15 V(PTRACE_OLDSETOPTIONS),
16 V(PTRACE_GET_THREAD_AREA),
17 V(PTRACE_SET_SYSCALL),
18 V(PTRACE_GETCRUNCHREGS),
19 V(PTRACE_SETCRUNCHREGS),
20 V(PTRACE_GETVFPREGS),
21 V(PTRACE_SETVFPREGS),
22 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
23 V(PTRACE_GETHBPREGS),
24 V(PTRACE_SETHBPREGS),
25 #endif
26 {0, NULL}
27 };
28 %}
29
30 function __arch_ptrace_request_str:string(request:long)
31 %{ /* pure */
32 _stp_lookup_str(_stp_arch_ptrace_request_list,
33 (unsigned long)STAP_ARG_request, STAP_RETVALUE,
34 MAXSTRINGLEN);
35 %}
36
37 function _arch_ptrace_argstr(request, pid, addr, data)
38 {
39 if (request == @const("PTRACE_GETREGS")
40 || request == @const("PTRACE_SETREGS")
41 || request == @const("PTRACE_GETFPREGS")
42 || request == @const("PTRACE_SETFPREGS")
43 || request == @const("PTRACE_GETWMMXREGS")
44 || request == @const("PTRACE_SETWMMXREGS")
45 || request == @const("PTRACE_SET_SYSCALL")
46 || request == @const("PTRACE_GETCRUNCHREGS")
47 || request == @const("PTRACE_SETCRUNCHREGS")
48 || request == @const("PTRACE_GETVFPREGS")
49 || request == @const("PTRACE_SETVFPREGS")
50 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
51 || request == @const("PTRACE_GETHBPREGS")
52 || request == @const("PTRACE_SETHBPREGS"))
53 #endif
54 return sprintf("%s, %d, %#x, %p",
55 __arch_ptrace_request_str(request), pid,
56 addr, data)
57 if (request == @const("PTRACE_OLDSETOPTIONS"))
58 return sprintf("PTRACE_OLDSETOPTIONS, %d, %#x, %s", pid,
59 addr, _ptrace_options_str(data))
60 if (request == @const("PTRACE_GET_THREAD_AREA"))
61 return sprintf("PTRACE_GET_THREAD_AREA, %d, %d, %p",
62 pid, __int32(addr), data)
63 }
64
65 function _ptrace_return_arch_prctl_addr:long(request:long, addr:long, data:long)
66 {
67 return 0
68 }