Home
last modified time | relevance | path

Searched refs:ptrace (Results 1 – 25 of 194) sorted by relevance

12345678

/external/libunwind/src/ptrace/
D_UPT_access_reg.c65 nat_bits = ptrace (PTRACE_PEEKUSER, pid, PT_NAT_BITS, 0); in _UPT_access_reg()
80 ptrace (PTRACE_POKEUSER, pid, PT_NAT_BITS, nat_bits); in _UPT_access_reg()
105 psr = ptrace (PTRACE_PEEKUSER, pid, PT_CR_IPSR, 0); in _UPT_access_reg()
117 ptrace (PTRACE_POKEUSER, pid, PT_CR_IIP, ip); in _UPT_access_reg()
118 ptrace (PTRACE_POKEUSER, pid, PT_CR_IPSR, psr); in _UPT_access_reg()
129 ip = ptrace (PTRACE_PEEKUSER, pid, PT_CR_IIP, 0); in _UPT_access_reg()
153 cfm = ptrace (PTRACE_PEEKUSER, pid, PT_CFM, 0); in _UPT_access_reg()
166 ptrace (PTRACE_POKEUSER, pid, PT_AR_BSP, bsp); in _UPT_access_reg()
177 bsp = ptrace (PTRACE_PEEKUSER, pid, PT_AR_BSP, 0); in _UPT_access_reg()
197 bsp = ptrace (PTRACE_PEEKUSER, pid, PT_AR_BSP, 0); in _UPT_access_reg()
[all …]
D_UPT_access_mem.c48 ptrace (PTRACE_POKEDATA, pid, (void*) (uintptr_t) addr, (void*) (uintptr_t) *val); in _UPT_access_mem()
64 reg1 = ptrace (PTRACE_PEEKDATA, pid, (void*) (uintptr_t) addr, 0); in _UPT_access_mem()
67 reg2 = ptrace (PTRACE_PEEKDATA, pid, (void*) (uintptr_t) (addr + sizeof(long)), 0); in _UPT_access_mem()
73 *val = ptrace (PTRACE_PEEKDATA, pid, (void*) addr, 0); in _UPT_access_mem()
100 if (ptrace(PT_IO, pid, (caddr_t)&iod, 0) == -1) in _UPT_access_mem()
/external/compiler-rt/test/sanitizer_common/TestCases/Linux/
Dptrace.cc26 ptrace(PTRACE_TRACEME, 0, NULL, NULL); in main()
34 res = ptrace(PTRACE_GETREGS, pid, NULL, &regs); in main()
40 res = ptrace(PTRACE_GETFPREGS, pid, NULL, &fpregs); in main()
48 res = ptrace((enum __ptrace_request)PTRACE_GETREGS, pid, NULL, &regs); in main()
62 res = ptrace((enum __ptrace_request)PTRACE_GETFPREGS, pid, NULL, &fpregs); in main()
68 res = ptrace((enum __ptrace_request)PTRACE_GETVFPREGS, pid, 0, regbuf); in main()
81 res = ptrace(PTRACE_GETREGSET, pid, (void*)NT_PRSTATUS, (void*)&regset_io); in main()
89 res = ptrace(PTRACE_GETREGSET, pid, (void*)NT_FPREGSET, (void*)&regset_io); in main()
96 res = ptrace(PTRACE_GETSIGINFO, pid, NULL, &siginfo); in main()
100 ptrace(PTRACE_CONT, pid, NULL, NULL); in main()
/external/ltrace/sysdeps/linux-gnu/mips/
Dtrace.c97 int insn = ptrace(PTRACE_PEEKTEXT, proc->pid, pc - 4, 0); in syscall_p()
98 int num = ptrace(PTRACE_PEEKTEXT, proc->pid, pc - 8, 0); in syscall_p()
154 inst = ptrace(PTRACE_PEEKTEXT, proc->pid, pc, 0); in mips_next_pcs()
194 rx = ptrace(PTRACE_PEEKUSER,proc->pid, rn, 0); in mips_next_pcs()
290 ptrace(PTRACE_SYSCALL, proc->pid, 0, 0); in arch_sw_singlestep()
331 return ptrace(PTRACE_PEEKUSER,proc->pid,off_v0,0); in gimme_arg()
334 unsigned a3=ptrace(PTRACE_PEEKUSER, proc->pid,off_a3,0); in gimme_arg()
335 unsigned v0=ptrace(PTRACE_PEEKUSER, proc->pid,off_v0,0); in gimme_arg()
345 ret=ptrace(PTRACE_PEEKUSER,proc->pid,off_fpr0+12+arg_num*2,0); in gimme_arg()
350 ret=ptrace(PTRACE_PEEKUSER,proc->pid,off_a0+arg_num,0); in gimme_arg()
[all …]
Dregs.c55 return (void *)ptrace(PTRACE_PEEKUSER, proc->pid, off_pc, 0); in get_instruction_pointer()
70 ptrace(PTRACE_POKEUSER, proc->pid, off_pc, addr); in set_instruction_pointer()
80 return (void *)ptrace(PTRACE_PEEKUSER, proc->pid, off_sp, 0); in get_stack_pointer()
96 return (void *)ptrace(PTRACE_PEEKUSER, proc->pid, off_lr, 0); in get_return_addr()
/external/ltrace/sysdeps/linux-gnu/ia64/
Dregs.c39 unsigned long ip = ptrace(PTRACE_PEEKUSER, proc->pid, PT_CR_IIP, 0); in get_instruction_pointer()
41 (ptrace(PTRACE_PEEKUSER, proc->pid, PT_CR_IPSR, 0) >> 41) & 3; in get_instruction_pointer()
52 unsigned long psr = ptrace(PTRACE_PEEKUSER, proc->pid, PT_CR_IPSR, 0); in set_instruction_pointer()
59 ptrace(PTRACE_POKEUSER, proc->pid, PT_CR_IIP, (long)newip); in set_instruction_pointer()
60 ptrace(PTRACE_POKEUSER, proc->pid, PT_CR_IPSR, psr); in set_instruction_pointer()
66 long l = ptrace(PTRACE_PEEKUSER, proc->pid, PT_R12, 0); in get_stack_pointer()
75 long l = ptrace(PTRACE_PEEKUSER, proc->pid, PT_B0, 0); in get_return_addr()
Dtrace.c77 long l = ptrace(PTRACE_PEEKUSER, proc->pid, PT_CR_IPSR, 0); in syscall_p()
82 ptrace(PTRACE_PEEKUSER, proc->pid, PT_CR_IIP, 0); in syscall_p()
86 ptrace(PTRACE_PEEKUSER, proc->pid, PT_R15, 0); in syscall_p()
98 bundle.code[0] = ptrace(PTRACE_PEEKTEXT, proc->pid, ip, 0); in syscall_p()
99 bundle.code[1] = ptrace(PTRACE_PEEKTEXT, proc->pid, ip + 8, 0); in syscall_p()
Dbreakpoint.c189 bundle.ubundle[0] = ptrace(PTRACE_PEEKTEXT, pid, addr, 0); in arch_enable_breakpoint()
190 bundle.ubundle[1] = ptrace(PTRACE_PEEKTEXT, pid, addr + 8, 0); in arch_enable_breakpoint()
205 ptrace(PTRACE_POKETEXT, pid, addr, bundle.ubundle[0]); in arch_enable_breakpoint()
206 ptrace(PTRACE_POKETEXT, pid, addr + 8, bundle.ubundle[1]); in arch_enable_breakpoint()
223 bundle.ubundle[0] = ptrace(PTRACE_PEEKTEXT, pid, addr, 0); in arch_disable_breakpoint()
224 bundle.ubundle[1] = ptrace(PTRACE_PEEKTEXT, pid, addr + 8, 0); in arch_disable_breakpoint()
229 ptrace(PTRACE_POKETEXT, pid, addr, bundle.ubundle[0]); in arch_disable_breakpoint()
230 ptrace(PTRACE_POKETEXT, pid, addr + 8, bundle.ubundle[1]); in arch_disable_breakpoint()
/external/ltrace/sysdeps/linux-gnu/s390/
Dtrace.c54 psw = ptrace(PTRACE_PEEKUSER, proc->pid, PT_PSWMASK, 0); in get_arch_dep()
87 *sysnum = ptrace(PTRACE_PEEKUSER, proc->pid, PT_GPR2, 0); in syscall_p()
117 pc = ptrace(PTRACE_PEEKUSER, proc->pid, PT_PSWADDR, 0); in syscall_p()
118 opcode = ptrace(PTRACE_PEEKTEXT, proc->pid, in syscall_p()
133 svc_addr += ptrace(PTRACE_PEEKUSER, proc->pid, in syscall_p()
138 svc_addr += ptrace(PTRACE_PEEKUSER, proc->pid, in syscall_p()
141 scno = ptrace(PTRACE_PEEKTEXT, proc->pid, svc_addr, 0); in syscall_p()
153 tmp = ptrace(PTRACE_PEEKUSER, proc->pid, in syscall_p()
163 scno = ptrace(PTRACE_PEEKUSER, proc->pid, PT_GPR1, 0); in syscall_p()
Dregs.c52 long ret = ptrace(PTRACE_PEEKUSER, proc->pid, PT_PSWADDR, 0) & PSW_MASK; in get_instruction_pointer()
72 ptrace(PTRACE_POKEUSER, proc->pid, PT_PSWADDR, addr); in set_instruction_pointer()
78 long ret = ptrace(PTRACE_PEEKUSER, proc->pid, PT_GPR15, 0) & PSW_MASK; in get_stack_pointer()
90 long ret = ptrace(PTRACE_PEEKUSER, proc->pid, PT_GPR14, 0) & PSW_MASK; in get_return_addr()
/external/ltrace/sysdeps/linux-gnu/alpha/
Dtrace.c55 long x = ptrace(PTRACE_PEEKTEXT, proc->pid, ip, 0); in syscall_p()
60 ptrace(PTRACE_PEEKUSER, proc->pid, 0 /* REG_R0 */ , 0); in syscall_p()
78 return ptrace(PTRACE_PEEKUSER, proc->pid, 0 /* REG_R0 */ , 0); in gimme_arg()
83 return ptrace(PTRACE_PEEKUSER, proc->pid, in gimme_arg()
86 return ptrace(PTRACE_PEEKTEXT, proc->pid, in gimme_arg()
90 return ptrace(PTRACE_PEEKUSER, proc->pid, in gimme_arg()
Dregs.c42 return (void *)ptrace(PTRACE_PEEKUSER, proc->pid, 64 /* REG_PC */ , 0); in get_instruction_pointer()
48 ptrace(PTRACE_POKEUSER, proc->pid, 64 /* REG_PC */ , addr); in set_instruction_pointer()
54 return (void *)ptrace(PTRACE_PEEKUSER, proc->pid, 30 /* REG_FP */ , 0); in get_stack_pointer()
60 return (void *)ptrace(PTRACE_PEEKUSER, proc->pid, 26 /* RA */ , 0); in get_return_addr()
/external/strace/
DREADME-linux-ptrace1 This document describes Linux ptrace implementation in Linux kernels
18 a specific tracee using ptrace(PTRACE_foo, pid, ...), where pid is a
23 There are many kinds of states when tracee is stopped, and in ptrace
28 ptrace commands from the tracer is called ptrace-stop. Ptrace-stops can
33 1.x Death under ptrace.
38 not a ptrace-stop (because tracer can't query tracee status such as
41 ptrace-stop.
55 Tracer can kill a tracee with ptrace(PTRACE_KILL, pid, 0, 0). This
72 Tracer cannot assume that ptrace-stopped tracee exists. There are many
75 ptrace operation. Unfortunately, the same error is returned if tracee
[all …]
/external/libunwind/tests/
Dtest-ptrace.c220 ptrace (PTRACE_TRACEME, 0, 0, 0); in main()
222 ptrace (PT_TRACE_ME, 0, 0, 0); in main()
296 ptrace (PTRACE_CONT, target_pid, 0, 0); in main()
298 ptrace (PT_CONTINUE, target_pid, (caddr_t)1, 0); in main()
306 ptrace (PTRACE_SINGLESTEP, target_pid, 0, pending_sig); in main()
308 ptrace (PT_STEP, target_pid, (caddr_t)1, pending_sig); in main()
320 ptrace (PTRACE_SYSCALL, target_pid, 0, pending_sig); in main()
322 ptrace (PT_SYSCALL, target_pid, (caddr_t)1, pending_sig); in main()
331 ptrace (PTRACE_SINGLESTEP, target_pid, 0, pending_sig); in main()
333 ptrace (PT_STEP, target_pid, (caddr_t)1, pending_sig); in main()
/external/ltrace/sysdeps/linux-gnu/cris/
Dtrace.c56 (int)ptrace(PTRACE_PEEKTEXT, proc->pid, pc - sizeof(long), in syscall_p()
61 (int)ptrace(PTRACE_PEEKUSER, proc->pid, in syscall_p()
80 return ptrace(PTRACE_PEEKUSER, pid, PT_R10 * 4, 0); in gimme_arg()
87 return ptrace(PTRACE_PEEKUSER, pid, pt_arg[arg_num] * 4, 0); in gimme_arg()
89 return ptrace(PTRACE_PEEKDATA, pid, in gimme_arg()
Dregs.c42 return (void *)ptrace(PTRACE_PEEKUSER, proc->pid, 4 * PT_PPC, 0); in get_instruction_pointer()
47 ptrace(PTRACE_POKEUSER, proc->pid, 4 * PT_PPC, addr); in set_instruction_pointer()
52 return (void *)ptrace(PTRACE_PEEKUSER, proc->pid, 4 * PT_USP, 0); in get_stack_pointer()
57 return (void *)ptrace(PTRACE_PEEKUSER, proc->pid, 4 * PT_SRP, 0); in get_return_addr()
/external/ltrace/sysdeps/linux-gnu/metag/
Dtrace.c84 if (ptrace(PTRACE_GETREGSET, proc->pid, NT_PRSTATUS, in syscall_p()
89 unsigned int insn = ptrace(PTRACE_PEEKTEXT, proc->pid, regs.pc, in syscall_p()
95 insn = ptrace(PTRACE_PEEKTEXT, proc->pid, regs.pc - 4, in syscall_p()
167 inst = ptrace(PTRACE_PEEKTEXT, proc->pid, pc, 0); in metag_next_pcs()
190 if (ptrace(PTRACE_GETREGSET, proc->pid, in metag_next_pcs()
212 if (ptrace(PTRACE_GETREGSET, proc->pid, in metag_next_pcs()
259 if (ptrace(PTRACE_GETREGSET, proc->pid, in metag_next_pcs()
264 newpc[nr++] = ptrace(PTRACE_PEEKTEXT, proc->pid, reg_val, 0); in metag_next_pcs()
285 if (ptrace(PTRACE_GETREGSET, proc->pid, in metag_next_pcs()
389 ptrace(PTRACE_SYSCALL, proc->pid, 0, 0); in arch_sw_singlestep()
[all …]
Dregs.c39 if (ptrace(PTRACE_GETREGSET, proc->pid, NT_PRSTATUS, (long)&iov)) in get_instruction_pointer()
53 if (ptrace(PTRACE_GETREGSET, proc->pid, NT_PRSTATUS, (long)&iov)) in set_instruction_pointer()
60 ptrace(PTRACE_SETREGSET, proc->pid, NT_PRSTATUS, (long)&iov); in set_instruction_pointer()
71 if (ptrace(PTRACE_GETREGSET, proc->pid, NT_PRSTATUS, (long)&iov)) in get_stack_pointer()
85 if (ptrace(PTRACE_GETREGSET, proc->pid, NT_PRSTATUS, (long)&iov)) in get_return_addr()
/external/libunwind/src/coredump/
DREADME1 This code is based on "unwinding via ptrace" code from ptrace/
5 from their ptrace/_UPT_... progenitors.
8 from ptrace/, or unimplemented stubs.
/external/ltrace/sysdeps/linux-gnu/m68k/
Dregs.c42 return (void *)ptrace(PTRACE_PEEKUSER, proc->pid, 4 * PT_PC, 0); in get_instruction_pointer()
48 ptrace(PTRACE_POKEUSER, proc->pid, 4 * PT_PC, addr); in set_instruction_pointer()
54 return (void *)ptrace(PTRACE_PEEKUSER, proc->pid, 4 * PT_USP, 0); in get_stack_pointer()
60 return (void *)ptrace(PTRACE_PEEKTEXT, proc->pid, stack_pointer, 0); in get_return_addr()
/external/ltrace/sysdeps/linux-gnu/ppc/
Dregs.c46 return (void *)ptrace(PTRACE_PEEKUSER, proc->pid, sizeof(long)*PT_NIP, 0); in get_instruction_pointer()
52 if (ptrace(PTRACE_POKEUSER, proc->pid, sizeof(long)*PT_NIP, addr) != 0) in set_instruction_pointer()
59 return (void *)ptrace(PTRACE_PEEKUSER, proc->pid, sizeof(long)*PT_R1, 0); in get_stack_pointer()
65 return (void *)ptrace(PTRACE_PEEKUSER, proc->pid, sizeof(long)*PT_LNK, 0); in get_return_addr()
/external/compiler-rt/test/asan/TestCases/Linux/
Dptrace.cc69 ptrace(PTRACE_TRACEME, 0, NULL, NULL); in main()
93 res = ptrace((enum __ptrace_request)__PTRACE_REQUEST, pid, __PTRACE_ARGS); in main()
105 res = ptrace((enum __ptrace_request)PTRACE_GETREGSET, pid, (void*)NT_FPREGSET, in main()
110 res = ptrace((enum __ptrace_request)__PTRACE_FPREQUEST, pid, __PTRACE_FPARGS); in main()
116 res = ptrace(PTRACE_GETFPXREGS, pid, NULL, &fpxregs); in main()
121 ptrace(PTRACE_CONT, pid, NULL, NULL); in main()
/external/libunwind/doc/
Dlibunwind-ptrace.tex8 …gin{Name}{3}{libunwind-ptrace}{David Mosberger-Tang}{Programming Library}{ptrace() support in libu…
13 \File{\#include $<$libunwind-ptrace.h$>$}\\
41 The \Func{ptrace}(2) system-call makes it possible for a process to
45 \Func{ptrace}(2). While it's not very difficult to do so directly,
49 stands for ``unwind-via-ptrace''.
68 Next, the application can turn on ptrace-mode on the target process,
80 the target process. It simply invokes \Func{ptrace}(2) with a command
91 Since \Func{ptrace}(2) works within a single machine only, the
113 \item[\File{libunwind-ptrace.h}] Headerfile to include when using the
115 \item[\Opt{-l}\File{unwind-ptrace} \Opt{-l}\File{unwind-generic}]
[all …]
/external/valgrind/coregrind/
Dvgdb-invoker-ptrace.c119 buffer[i] = ptrace (PTRACE_PEEKTEXT, inferior_pid, in ptrace_read_memory()
161 buffer[0] = ptrace (PTRACE_PEEKTEXT, inferior_pid, in ptrace_write_memory()
166 = ptrace (PTRACE_PEEKTEXT, inferior_pid, in ptrace_write_memory()
181 ptrace (PTRACE_POKETEXT, inferior_pid, in ptrace_write_memory()
309 res = ptrace (PTRACE_GETSIGINFO, pid, NULL, newsiginfo); in waitstopped()
317 res = ptrace (PTRACE_CONT, pid, NULL, 0); in waitstopped()
320 res = ptrace (PTRACE_CONT, pid, NULL, signal_received); in waitstopped()
365 res = ptrace (PTRACE_ATTACH, pid, NULL, NULL); in attach()
498 res = ptrace (PTRACE_DETACH, vgdb_threads[i].lwpid, NULL, NULL); in detach_from_all_threads()
515 res = ptrace (PTRACE_DETACH, pid, NULL, NULL); in detach_from_all_threads()
[all …]
/external/libunwind/
DAndroid.mk141 src/ptrace/_UPT_accessors.c \
142 src/ptrace/_UPT_access_fpreg.c \
143 src/ptrace/_UPT_access_mem.c \
144 src/ptrace/_UPT_access_reg.c \
145 src/ptrace/_UPT_create.c \
146 src/ptrace/_UPT_destroy.c \
147 src/ptrace/_UPT_find_proc_info.c \
148 src/ptrace/_UPT_get_dyn_info_list_addr.c \
149 src/ptrace/_UPT_put_unwind_info.c \
150 src/ptrace/_UPT_get_proc_name.c \
[all …]

12345678