Home
last modified time | relevance | path

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

123456

/third_party/rust/crates/nix/test/sys/
Dtest_ptrace.rs8 use nix::sys::ptrace;
10 use nix::sys::ptrace::Options;
23 let err = ptrace::attach(getpid()).unwrap_err(); in test_ptrace()
34 let err = ptrace::setoptions(getpid(), Options::PTRACE_O_TRACESYSGOOD) in test_ptrace_setoptions()
44 let err = ptrace::getevent(getpid()).unwrap_err(); in test_ptrace_getevent()
53 if let Err(Errno::EOPNOTSUPP) = ptrace::getsiginfo(getpid()) { in test_ptrace_getsiginfo()
64 if let Err(Errno::EOPNOTSUPP) = ptrace::setsiginfo(getpid(), &siginfo) { in test_ptrace_setsiginfo()
71 use nix::sys::ptrace; in test_ptrace_cont()
87 let err = ptrace::attach(getpid()).unwrap_err(); in test_ptrace_cont()
94 ptrace::traceme().unwrap(); in test_ptrace_cont()
[all …]
Dtest_wait.rs146 mod ptrace { module
149 use nix::sys::ptrace::{self, Event, Options};
156 ptrace::traceme().unwrap(); in ptrace_child()
170 ptrace::setoptions( in ptrace_wait_parent()
177 ptrace::syscall(child, None).expect("syscall failed"); in ptrace_wait_parent()
180 ptrace::cont(child, None).expect("cont failed"); in ptrace_wait_parent()
190 ptrace::cont(child, None).expect("cont failed"); in ptrace_wait_parent()
205 ptrace::setoptions( in ptrace_waitid_parent()
212 ptrace::syscall(child, None).expect("syscall failed"); in ptrace_waitid_parent()
218 ptrace::cont(child, None).expect("cont failed"); in ptrace_waitid_parent()
[all …]
/third_party/ltp/m4/
Dltp-ptrace.m48 dnl Check for ptrace support
13 sys/ptrace.h \
15 asm/ptrace.h \
16 linux/ptrace.h \
19 CPPFLAGS="$CPPFLAGS -I$srcdir/testcases/kernel/syscalls/ptrace"
20 AC_CHECK_TYPES([struct user_regs_struct, struct pt_regs],,,[#include "ptrace.h"])
21 AC_CHECK_DECLS([PTRACE_GETSIGINFO, PTRACE_O_TRACEVFORKDONE, PTRACE_SETOPTIONS],,,[#include "ptrace.…
22 dnl glibc-2.18 defines ptrace_peeksiginfo_args in sys/ptrace.h which
23 dnl conflicts with the one from linux kernel in linux/ptrace.h
24 AC_CHECK_TYPES([struct ptrace_peeksiginfo_args],,,[#include <sys/ptrace.h>])
/third_party/libunwind/src/ptrace/
D_UPT_access_reg.c66 if (ptrace (PTRACE_GETREGSET, pid, NT_PRSTATUS, &loc) == -1) in _UPT_access_reg()
70 if (ptrace(PTRACE_SETREGSET, pid, NT_PRSTATUS, &loc) == -1) in _UPT_access_reg()
106 nat_bits = ptrace (PTRACE_PEEKUSER, pid, PT_NAT_BITS, 0); in _UPT_access_reg()
121 ptrace (PTRACE_POKEUSER, pid, PT_NAT_BITS, nat_bits); in _UPT_access_reg()
146 psr = ptrace (PTRACE_PEEKUSER, pid, PT_CR_IPSR, 0); in _UPT_access_reg()
158 ptrace (PTRACE_POKEUSER, pid, PT_CR_IIP, ip); in _UPT_access_reg()
159 ptrace (PTRACE_POKEUSER, pid, PT_CR_IPSR, psr); in _UPT_access_reg()
170 ip = ptrace (PTRACE_PEEKUSER, pid, PT_CR_IIP, 0); in _UPT_access_reg()
194 cfm = ptrace (PTRACE_PEEKUSER, pid, PT_CFM, 0); in _UPT_access_reg()
207 ptrace (PTRACE_POKEUSER, pid, PT_AR_BSP, bsp); in _UPT_access_reg()
[all …]
Dlibunwind-ptrace.pc.in6 Name: libunwind-ptrace
7 Description: libunwind ptrace library
10 Libs: -L${libdir} -lunwind-ptrace
D_UPT_access_fpreg.c49 ptrace (PTRACE_POKEUSER, pid, _UPT_reg_offset[reg] + i * sizeof(wp[i]), in _UPT_access_fpreg()
61 wp[i] = ptrace (PTRACE_PEEKUSER, pid, in _UPT_access_fpreg()
99 if (ptrace(PT_GETFPREGS, pid, (caddr_t)&fpreg, 0) == -1) in _UPT_access_fpreg()
115 if (ptrace(PT_SETFPREGS, pid, (caddr_t)&fpreg, 0) == -1) in _UPT_access_fpreg()
D_UPT_access_mem.c69 ptrace (PTRACE_POKEDATA, pid, tmp_addr, tmp_val); in _UPT_access_mem()
79 tmp_val = (unsigned long) ptrace (PTRACE_PEEKDATA, pid, tmp_addr, 0); in _UPT_access_mem()
115 if (ptrace(PT_IO, pid, (caddr_t)&iod, 0) == -1) in _UPT_access_mem()
D_UPT_resume.c36 return ptrace (PTRACE_CONT, ui->pid, 0, 0); in _UPT_resume()
38 return ptrace(PT_CONTINUE, ui->pid, (caddr_t)1, 0); in _UPT_resume()
/third_party/libunwind/tests/
Dtest-ptrace.c225 ptrace (PTRACE_TRACEME, 0, 0, 0); in main()
227 ptrace (PT_TRACE_ME, 0, 0, 0); in main()
301 ptrace (PTRACE_CONT, target_pid, 0, 0); in main()
303 ptrace (PT_CONTINUE, target_pid, (caddr_t)1, 0); in main()
311 if (ptrace (PTRACE_SINGLESTEP, target_pid, 0, pending_sig) < 0) in main()
317 if (ptrace (PT_STEP, target_pid, (caddr_t)1, pending_sig) < 0) in main()
333 ptrace (PTRACE_SYSCALL, target_pid, 0, pending_sig); in main()
335 ptrace (PT_SYSCALL, target_pid, (caddr_t)1, pending_sig); in main()
344 ptrace (PTRACE_SINGLESTEP, target_pid, 0, pending_sig); in main()
346 ptrace (PT_STEP, target_pid, (caddr_t)1, pending_sig); in main()
DMakefile.am4 EXTRA_DIST = run-ia64-test-dyn1 run-ptrace-mapper run-ptrace-misc \
62 check_SCRIPTS_cdep += run-ptrace-mapper run-ptrace-misc
63 check_PROGRAMS_cdep += test-ptrace
64 noinst_PROGRAMS_cdep += mapper test-ptrace-misc
113 XFAIL_TESTS_PTRACE_SINGLESTEP = run-ptrace-mapper run-ptrace-misc
132 XFAIL_TESTS += run-ptrace-mapper test-ptrace Ltest-init-local-signal
173 test_ptrace_misc_SOURCES = test-ptrace-misc.c ident.c
181 LIBUNWIND_ptrace = $(top_builddir)/src/libunwind-ptrace.la
Drun-ptrace-misc2 ./test-ptrace -c -t ./test-ptrace-misc
/third_party/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.
/third_party/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 …]
/third_party/ltp/testcases/kernel/controllers/freezer/
Dvfork.c82 if (ptrace(PTRACE_KILL, child, NULL, NULL) < 0) { in kill_child()
207 if (ptrace(PTRACE_GETSIGINFO, gchild, NULL, &info) == -1) { in trace_grandchild()
222 if (ptrace(PTRACE_DETACH, gchild, NULL, NULL) == -1) in trace_grandchild()
254 if (ptrace(PTRACE_CONT, process, NULL, NULL) == -1) in do_trace()
341 if (ptrace(PTRACE_ATTACH, child, NULL, NULL) == -1) { in main()
351 if (ptrace(PTRACE_SETOPTIONS, child, NULL, in main()
357 if (ptrace(PTRACE_CONT, child, NULL, NULL) == in main()
/third_party/libunwind/
DBUILD.gn71 "src/ptrace/_UPT_access_fpreg.c",
72 "src/ptrace/_UPT_access_mem.c",
73 "src/ptrace/_UPT_access_reg.c",
74 "src/ptrace/_UPT_accessors.c",
75 "src/ptrace/_UPT_create.c",
76 "src/ptrace/_UPT_destroy.c",
77 "src/ptrace/_UPT_find_proc_info.c",
78 "src/ptrace/_UPT_get_dyn_info_list_addr.c",
79 "src/ptrace/_UPT_get_proc_name.c",
80 "src/ptrace/_UPT_put_unwind_info.c",
[all …]
DNEWS11 ** aarch64 ptrace support
57 ** Fix a bug in libunwind-ptrace which could cause crash due to extraneous
105 ** Added test-case tests/run-ptrace-misc which, on ia64, triggers a bug in
129 *** Fix a crash in libunwind-ptrace courtesy of Mark Young.
139 ** The ptrace-helper routines are now declared in libunwind-ptrace.h.
140 Applications which use ptrace-based unwinding should include
141 <libunwind-ptrace.h> to get the _UPT_*() routines declared.
148 libunwind-generic.a (archive version). Similarly, the ptrace()
150 libunwind-ptrace.a. For the most part, backwards-compatibility
160 ptrace-based unwinding: -lunwind -lunwind-ptrace -lunwind-generic
/third_party/ltp/testcases/kernel/syscalls/ptrace/
Dptrace07.c104 TEST(ptrace(PTRACE_ATTACH, pid, 0, 0)); in do_test()
109 TEST(ptrace(PTRACE_GETREGSET, pid, NT_X86_XSTATE, &iov)); in do_test()
134 TEST(ptrace(PTRACE_SETREGSET, pid, NT_X86_XSTATE, &iov)); in do_test()
154 TEST(ptrace(PTRACE_DETACH, pid, 0, 0)); in do_test()
Dptrace04.c60 ret = ptrace(PTRACE_GETREGS, pid, NULL, &_pt_regs); in compare_registers()
67 ret = ptrace(PTRACE_PEEKUSER, pid, in compare_registers()
117 if (ptrace(PTRACE_SYSCALL, pid, NULL, NULL) && errno) { in main()
125 ptrace(PTRACE_KILL, pid, NULL, NULL); in main()
Dptrace08.c106 TEST(ptrace(PTRACE_POKEUSER, child_pid, in ptrace_try_kern_addr()
111 TEST(ptrace(PTRACE_POKEUSER, child_pid, in ptrace_try_kern_addr()
127 addr = ptrace(PTRACE_PEEKUSER, child_pid, in ptrace_try_kern_addr()
/third_party/libunwind/src/
DCMakeLists.txt24 ptrace/_UPT_elf.c
25 ptrace/_UPT_accessors.c ptrace/_UPT_access_fpreg.c
26 ptrace/_UPT_access_mem.c ptrace/_UPT_access_reg.c
27 ptrace/_UPT_create.c ptrace/_UPT_destroy.c
28 ptrace/_UPT_find_proc_info.c ptrace/_UPT_get_dyn_info_list_addr.c
29 ptrace/_UPT_put_unwind_info.c ptrace/_UPT_get_proc_name.c
30 ptrace/_UPT_reg_offset.c ptrace/_UPT_resume.c
DMakefile.am14 lib_LTLIBRARIES += libunwind-ptrace.la
32 pkgconfig_DATA += ptrace/libunwind-ptrace.pc
45 ptrace/_UPT_elf.c \
46 ptrace/_UPT_accessors.c ptrace/_UPT_access_fpreg.c \
47 ptrace/_UPT_access_mem.c ptrace/_UPT_access_reg.c \
48 ptrace/_UPT_create.c ptrace/_UPT_destroy.c \
49 ptrace/_UPT_find_proc_info.c ptrace/_UPT_get_dyn_info_list_addr.c \
50 ptrace/_UPT_put_unwind_info.c ptrace/_UPT_get_proc_name.c \
51 ptrace/_UPT_reg_offset.c ptrace/_UPT_resume.c
52 noinst_HEADERS += ptrace/_UPT_internal.h
/third_party/elfutils/backends/
Dsparc_initreg.c60 if (ptrace (PTRACE_GETREGS, tid, &regs, 0) == -1) in EBLHOOK()
94 locals_outs[i] = ptrace (PTRACE_PEEKDATA, tid, in EBLHOOK()
107 Dwarf_Word tuple = ptrace (PTRACE_PEEKDATA, tid, in EBLHOOK()
Daarch64_initreg.c63 if (ptrace (PTRACE_GETREGSET, tid, NT_PRSTATUS, &iovec) != 0) in aarch64_set_initial_registers_tid()
80 if (ptrace (PTRACE_GETREGSET, tid, NT_FPREGSET, &iovec) != 0) in aarch64_set_initial_registers_tid()
/third_party/elfutils/libdwfl/
Dlinux-pid-attach.c77 if (ptrace (PTRACE_ATTACH, tid, NULL, NULL) != 0) in __libdwfl_ptrace_attach()
92 ptrace (PTRACE_CONT, tid, NULL, NULL); in __libdwfl_ptrace_attach()
100 ptrace (PTRACE_DETACH, tid, NULL, NULL); in __libdwfl_ptrace_attach()
107 if (ptrace (PTRACE_CONT, tid, NULL, in __libdwfl_ptrace_attach()
111 ptrace (PTRACE_DETACH, tid, NULL, NULL); in __libdwfl_ptrace_attach()
217 *result = ptrace (PTRACE_PEEKDATA, tid, (void *) (uintptr_t) addr, NULL); in pid_memory_read()
232 *result = ptrace (PTRACE_PEEKDATA, tid, (void *) (uintptr_t) addr, NULL); in pid_memory_read()
359 ptrace (PTRACE_DETACH, tid, NULL, in __libdwfl_ptrace_detach()
/third_party/libevdev/test/
Dtest-main.c38 if (ptrace(PTRACE_ATTACH, ppid, NULL, NULL) == 0) { in is_debugger_attached()
40 ptrace(PTRACE_CONT, NULL, NULL); in is_debugger_attached()
41 ptrace(PTRACE_DETACH, ppid, NULL, NULL); in is_debugger_attached()

123456