Home
last modified time | relevance | path

Searched refs:proc (Results 1 – 25 of 642) sorted by relevance

12345678910>>...26

/external/ltrace/
Dproc.c42 os_process_init(struct process *proc) in os_process_init() argument
48 os_process_destroy(struct process *proc) in os_process_destroy() argument
53 os_process_clone(struct process *retp, struct process *proc) in os_process_clone() argument
59 os_process_exec(struct process *proc) in os_process_exec() argument
67 arch_process_init(struct process *proc) in arch_process_init() argument
73 arch_process_destroy(struct process *proc) in arch_process_destroy() argument
78 arch_process_clone(struct process *retp, struct process *proc) in arch_process_clone() argument
84 arch_process_exec(struct process *proc) in arch_process_exec() argument
92 arch_dynlink_done(struct process *proc) in arch_dynlink_done() argument
97 static int add_process(struct process *proc, int was_exec);
[all …]
Dhandle_event.c59 static void callstack_push_syscall(struct process *proc, int sysnum);
60 static void callstack_push_symfunc(struct process *proc, struct breakpoint *bp);
64 void callstack_pop(struct process *proc);
66 static char *shortsignal(struct process *proc, int signum);
67 static char *sysname(struct process *proc, int sysnum);
68 static char *arch_sysname(struct process *proc, int sysnum);
71 call_handler(struct process *proc, Event *event) in call_handler() argument
73 assert(proc != NULL); in call_handler()
75 struct event_handler *handler = proc->event_handler; in call_handler()
91 event->proc ? event->proc->pid : -1, event->type); in handle_event()
[all …]
Dbreakpoints.c45 arch_translate_address_dyn(struct process *proc, in arch_translate_address_dyn() argument
63 breakpoint_on_hit(struct breakpoint *bp, struct process *proc) in breakpoint_on_hit() argument
67 (bp->cbs->on_hit)(bp, proc); in breakpoint_on_hit()
71 breakpoint_on_continue(struct breakpoint *bp, struct process *proc) in breakpoint_on_continue() argument
75 (bp->cbs->on_continue)(bp, proc); in breakpoint_on_continue()
77 continue_after_breakpoint(proc, bp); in breakpoint_on_continue()
81 breakpoint_on_retract(struct breakpoint *bp, struct process *proc) in breakpoint_on_retract() argument
85 (bp->cbs->on_retract)(bp, proc); in breakpoint_on_retract()
89 breakpoint_on_install(struct breakpoint *bp, struct process *proc) in breakpoint_on_install() argument
93 (bp->cbs->on_install)(bp, proc); in breakpoint_on_install()
[all …]
Dbackend.h73 void trace_set_options(struct process *proc);
89 void get_arch_dep(struct process *proc);
98 void *get_instruction_pointer(struct process *proc);
101 void set_instruction_pointer(struct process *proc, void *addr);
104 void *get_stack_pointer(struct process *proc);
108 void *get_return_addr(struct process *proc, void *stack_pointer);
111 void enable_breakpoint(struct process *proc, struct breakpoint *sbp);
114 void disable_breakpoint(struct process *proc, struct breakpoint *sbp);
121 int syscall_p(struct process *proc, int status, int *sysnum);
135 void continue_after_syscall(struct process *proc, int sysnum, int ret_p);
[all …]
Dproc.h154 int process_init(struct process *proc, const char *filename, pid_t pid);
159 int process_exec(struct process *proc);
167 void process_destroy(struct process *proc);
175 int process_clone(struct process *retp, struct process *proc, pid_t pid);
181 enum callback_status (*cb)(struct process *proc,
187 struct process *each_task(struct process *proc, struct process *start_after,
188 enum callback_status (*cb)(struct process *proc,
192 void change_process_leader(struct process *proc, struct process *leader);
196 void process_hit_start(struct process *proc);
200 void remove_process(struct process *proc);
[all …]
Dbreakpoint.h47 void (*on_hit)(struct breakpoint *bp, struct process *proc);
48 void (*on_continue)(struct breakpoint *bp, struct process *proc);
49 void (*on_install)(struct breakpoint *bp, struct process *proc);
50 void (*on_retract)(struct breakpoint *bp, struct process *proc);
59 struct breakpoint *bp, struct process *proc);
73 void breakpoint_on_hit(struct breakpoint *bp, struct process *proc);
77 void breakpoint_on_continue(struct breakpoint *bp, struct process *proc);
86 void breakpoint_on_retract(struct breakpoint *bp, struct process *proc);
92 void breakpoint_on_install(struct breakpoint *bp, struct process *proc);
97 struct breakpoint *bp, struct process *proc);
[all …]
Dfetch.c30 struct fetch_context *arch_fetch_arg_init(enum tof type, struct process *proc,
33 struct fetch_context *arch_fetch_arg_clone(struct process *proc,
37 struct process *proc, struct arg_type_info *info,
41 struct process *proc, struct arg_type_info *info,
56 long gimme_arg(enum tof type, struct process *proc, int arg_num,
64 arch_fetch_arg_init(enum tof type, struct process *proc, in arch_fetch_arg_init() argument
71 arch_fetch_arg_clone(struct process *proc, struct fetch_context *context) in arch_fetch_arg_clone() argument
81 struct process *proc, in arch_fetch_arg_next() argument
84 long l = gimme_arg(type, proc, context->argnum++, info); in arch_fetch_arg_next()
91 struct process *proc, in arch_fetch_retval() argument
[all …]
/external/ltrace/sysdeps/linux-gnu/s390/
Dtrace.c46 get_arch_dep(struct process *proc) in get_arch_dep() argument
51 if (proc->arch_ptr) in get_arch_dep()
54 psw = ptrace(PTRACE_PEEKUSER, proc->pid, PT_PSWMASK, 0); in get_arch_dep()
57 proc->mask_32bit = 1; in get_arch_dep()
58 proc->personality = 1; in get_arch_dep()
61 proc->arch_ptr = (void *)1; in get_arch_dep()
68 syscall_p(struct process *proc, int status, int *sysnum) in syscall_p() argument
79 && WSTOPSIG(status) == (SIGTRAP | proc->tracesysgood)) { in syscall_p()
87 *sysnum = ptrace(PTRACE_PEEKUSER, proc->pid, PT_GPR2, 0); in syscall_p()
89 if (proc->tracesysgood) { in syscall_p()
[all …]
Dfetch.c65 fetch_register_banks(struct process *proc, struct fetch_context *ctx, in fetch_register_banks() argument
72 if (ptrace(PTRACE_PEEKUSR_AREA, proc->pid, &parea, NULL) < 0) { in fetch_register_banks()
85 fetch_context_init(struct process *proc, struct fetch_context *context, in fetch_context_init() argument
90 return fetch_register_banks(proc, context, syscall_enter); in fetch_context_init()
94 arch_fetch_arg_init(enum tof type, struct process *proc, in arch_fetch_arg_init() argument
99 || fetch_context_init(proc, context, type == LT_TOF_SYSCALL) < 0) { in arch_fetch_arg_init()
106 context->stack_pointer = get_stack_pointer(proc) in arch_fetch_arg_init()
115 arch_fetch_arg_clone(struct process *proc, in arch_fetch_arg_clone() argument
126 allocate_stack_slot(struct fetch_context *ctx, struct process *proc, in allocate_stack_slot() argument
158 allocate_gpr(struct fetch_context *ctx, struct process *proc, in allocate_gpr() argument
[all …]
/external/ltrace/sysdeps/linux-gnu/ppc/
Dtrace.c52 get_arch_dep(struct process *proc) in get_arch_dep() argument
55 proc->mask_32bit = (proc->e_machine == EM_PPC); in get_arch_dep()
63 syscall_p(struct process *proc, int status, int *sysnum) in syscall_p() argument
66 && WSTOPSIG(status) == (SIGTRAP | proc->tracesysgood)) { in syscall_p()
67 long pc = (long)get_instruction_pointer(proc); in syscall_p()
69 (int)ptrace(PTRACE_PEEKTEXT, proc->pid, pc - sizeof(long), in syscall_p()
74 (int)ptrace(PTRACE_PEEKUSER, proc->pid, in syscall_p()
76 if (proc->callstack_depth > 0 && in syscall_p()
77 proc->callstack[proc->callstack_depth - 1].is_syscall && in syscall_p()
78 proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) { in syscall_p()
[all …]
Dfetch.c34 static int allocate_gpr(struct fetch_context *ctx, struct process *proc,
69 fetch_context_init(struct process *proc, struct fetch_context *context) in fetch_context_init() argument
74 if (proc->e_machine == EM_PPC) in fetch_context_init()
75 context->stack_pointer = proc->stack_pointer + 8; in fetch_context_init()
77 context->stack_pointer = proc->stack_pointer + 112; in fetch_context_init()
85 if (proc->e_machine == EM_PPC64) { in fetch_context_init()
86 if (ptrace(PTRACE_GETREGS64, proc->pid, 0, in fetch_context_init()
91 if (ptrace(PTRACE_GETREGS, proc->pid, 0, in fetch_context_init()
98 if (ptrace(PTRACE_GETREGS, proc->pid, 0, in fetch_context_init()
104 if (ptrace(PTRACE_GETFPREGS, proc->pid, 0, &context->fpregs) < 0) in fetch_context_init()
[all …]
/external/ltrace/sysdeps/linux-gnu/x86/
Dtrace.c58 get_arch_dep(struct process *proc) in get_arch_dep() argument
63 if (proc->e_machine == EM_X86_64) { in get_arch_dep()
64 proc->mask_32bit = 0; in get_arch_dep()
65 proc->personality = 1; in get_arch_dep()
67 proc->mask_32bit = 1; in get_arch_dep()
68 proc->personality = 0; in get_arch_dep()
70 proc->mask_32bit = 0; in get_arch_dep()
71 proc->personality = 0; in get_arch_dep()
78 syscall_p(struct process *proc, int status, int *sysnum) in syscall_p() argument
81 && WSTOPSIG(status) == (SIGTRAP | proc->tracesysgood)) { in syscall_p()
[all …]
/external/ltrace/sysdeps/linux-gnu/
Dproc.c283 select_32_64(struct process *proc, void *p32, void *p64) in select_32_64() argument
285 if (sizeof(long) == 4 || proc->mask_32bit) in select_32_64()
292 fetch_dyn64(struct process *proc, arch_addr_t *addr, Elf64_Dyn *ret) in fetch_dyn64() argument
294 if (umovebytes(proc, *addr, ret, sizeof(*ret)) != sizeof(*ret)) in fetch_dyn64()
301 fetch_dyn32(struct process *proc, arch_addr_t *addr, Elf64_Dyn *ret) in fetch_dyn32() argument
304 if (umovebytes(proc, *addr, &dyn, sizeof(dyn)) != sizeof(dyn)) in fetch_dyn32()
315 dyn_fetcher(struct process *proc))(struct process *, in dyn_fetcher() argument
318 return select_32_64(proc, fetch_dyn32, fetch_dyn64); in dyn_fetcher()
322 proc_find_dynamic_entry_addr(struct process *proc, arch_addr_t src_addr, in proc_find_dynamic_entry_addr() argument
333 if (dyn_fetcher(proc)(proc, &src_addr, &entry) < 0 in proc_find_dynamic_entry_addr()
[all …]
Dtrace.c121 trace_set_options(struct process *proc) in trace_set_options() argument
123 if (proc->tracesysgood & 0x80) in trace_set_options()
126 pid_t pid = proc->pid; in trace_set_options()
137 proc->tracesysgood |= 0x80; in trace_set_options()
157 if (event->proc != NULL && event->proc->pid == (pid_t)(uintptr_t)data) in event_for_pid()
331 ugly_workaround(struct process *proc) in ugly_workaround() argument
333 arch_addr_t ip = get_instruction_pointer(proc); in ugly_workaround()
335 if (DICT_FIND_VAL(proc->leader->breakpoints, &ip, &found) < 0) { in ugly_workaround()
336 insert_breakpoint_at(proc, ip, NULL); in ugly_workaround()
339 enable_breakpoint(proc, found); in ugly_workaround()
[all …]
/external/ltrace/sysdeps/linux-gnu/aarch64/
Dregs.c34 aarch64_read_gregs(struct process *proc, struct user_pt_regs *regs) in aarch64_read_gregs() argument
40 return ptrace(PTRACE_GETREGSET, proc->pid, NT_PRSTATUS, &iovec) < 0 in aarch64_read_gregs()
45 aarch64_write_gregs(struct process *proc, struct user_pt_regs *regs) in aarch64_write_gregs() argument
50 return ptrace(PTRACE_SETREGSET, proc->pid, NT_PRSTATUS, &iovec) < 0 in aarch64_write_gregs()
55 aarch64_read_fregs(struct process *proc, struct user_fpsimd_state *regs) in aarch64_read_fregs() argument
61 return ptrace(PTRACE_GETREGSET, proc->pid, NT_FPREGSET, &iovec) < 0 in aarch64_read_fregs()
66 get_instruction_pointer(struct process *proc) in get_instruction_pointer() argument
69 if (aarch64_read_gregs(proc, &regs) < 0) { in get_instruction_pointer()
71 "Couldn't read registers of %d.\n", proc->pid); in get_instruction_pointer()
86 set_instruction_pointer(struct process *proc, arch_addr_t addr) in set_instruction_pointer() argument
[all …]
Dtrace.c33 get_arch_dep(struct process *proc) in get_arch_dep() argument
37 int aarch64_read_gregs(struct process *proc, struct user_pt_regs *regs);
46 syscall_p(struct process *proc, int status, int *sysnum) in syscall_p() argument
49 && WSTOPSIG(status) == (SIGTRAP | proc->tracesysgood)) { in syscall_p()
52 if (aarch64_read_gregs(proc, &regs) < 0) { in syscall_p()
54 "Couldn't read registers of %d.\n", proc->pid); in syscall_p()
60 proc->pid, in syscall_p()
64 "Couldn't peek into %d: %s\n", proc->pid, in syscall_p()
73 size_t d1 = proc->callstack_depth - 1; in syscall_p()
74 if (proc->callstack_depth > 0 in syscall_p()
[all …]
/external/ltrace/sysdeps/linux-gnu/sparc/
Dtrace.c34 get_arch_dep(struct process *proc) in get_arch_dep() argument
37 if (!proc->arch_ptr) in get_arch_dep()
38 proc->arch_ptr = (void *)malloc(sizeof(proc_archdep)); in get_arch_dep()
39 a = (proc_archdep *) (proc->arch_ptr); in get_arch_dep()
40 a->valid = (ptrace(PTRACE_GETREGS, proc->pid, &a->regs, 0) >= 0); in get_arch_dep()
47 syscall_p(struct process *proc, int status, int *sysnum) in syscall_p() argument
50 && WSTOPSIG(status) == (SIGTRAP | proc->tracesysgood)) { in syscall_p()
51 void *ip = get_instruction_pointer(proc); in syscall_p()
55 insn = ptrace(PTRACE_PEEKTEXT, proc->pid, ip, 0); in syscall_p()
57 *sysnum = ((proc_archdep *) proc->arch_ptr)->regs.u_regs[UREG_G0]; in syscall_p()
[all …]
/external/ltrace/sysdeps/linux-gnu/ia64/
Dfetch.c66 fetch_context_init(struct process *proc, struct fetch_context *context) in fetch_context_init() argument
70 if (ptrace(PTRACE_GETREGS, proc->pid, 0, &context->regs) < 0) in fetch_context_init()
79 arch_fetch_arg_init(enum tof type, struct process *proc, in arch_fetch_arg_init() argument
84 || fetch_context_init(proc, context) < 0) { in arch_fetch_arg_init()
94 arch_fetch_arg_clone(struct process *proc, in arch_fetch_arg_clone() argument
105 allocate_stack_slot(struct fetch_context *ctx, struct process *proc, in allocate_stack_slot() argument
108 size_t al = type_alignof(proc, info); in allocate_stack_slot()
109 size_t sz = type_sizeof(proc, info); in allocate_stack_slot()
114 long value = ptrace(PTRACE_PEEKDATA, proc->pid, ctx->stack_pointer, 0); in allocate_stack_slot()
124 allocate_reg(struct fetch_context *ctx, struct process *proc, in allocate_reg() argument
[all …]
/external/toybox/toys/pending/
Dtop.c99 static void read_stat(char *filename, struct proc_info *proc) in read_stat() argument
115 snprintf(proc->tname, PROC_NAME_LEN, "[%s]",open_paren + 1); in read_stat()
121 &proc->state[0], &proc->ppid, &proc->utime, &proc->stime, &nice, in read_stat()
122 &proc->vss, &proc->rss, &proc->prs); in read_stat()
123 if (!proc->vss && proc->state[0] != 'Z') proc->state[1] = 'W'; in read_stat()
124 else proc->state[1] = ' '; in read_stat()
125 if (nice < 0 ) proc->state[2] = '<'; in read_stat()
126 else if (nice) proc->state[2] = 'N'; in read_stat()
127 else proc->state[2] = ' '; in read_stat()
130 static void read_status(char *filename, struct proc_info *proc) in read_status() argument
[all …]
/external/ltrace/sysdeps/linux-gnu/alpha/
Dtrace.c43 get_arch_dep(struct process *proc) in get_arch_dep() argument
50 syscall_p(struct process *proc, int status, int *sysnum) in syscall_p() argument
53 && WSTOPSIG(status) == (SIGTRAP | proc->tracesysgood)) { in syscall_p()
54 char *ip = get_instruction_pointer(proc) - 4; in syscall_p()
55 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()
61 if (proc->callstack_depth > 0 && in syscall_p()
62 proc->callstack[proc->callstack_depth - 1].is_syscall && in syscall_p()
63 proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) { in syscall_p()
74 gimme_arg(enum tof type, struct process *proc, int arg_num, in gimme_arg() argument
[all …]
/external/ltrace/sysdeps/linux-gnu/arm/
Dtrace.c49 get_arch_dep(struct process *proc) in get_arch_dep() argument
53 if (!proc->arch_ptr) in get_arch_dep()
54 proc->arch_ptr = (void *)malloc(sizeof(proc_archdep)); in get_arch_dep()
55 a = (proc_archdep *) (proc->arch_ptr); in get_arch_dep()
56 a->valid = (ptrace(PTRACE_GETREGS, proc->pid, 0, &a->regs) >= 0); in get_arch_dep()
65 syscall_p(struct process *proc, int status, int *sysnum) in syscall_p() argument
68 && WSTOPSIG(status) == (SIGTRAP | proc->tracesysgood)) { in syscall_p()
70 if (arm_get_register(proc, ARM_REG_PC, &pc) < 0 in syscall_p()
71 || arm_get_register(proc, ARM_REG_IP, &ip) < 0) in syscall_p()
77 unsigned insn = ptrace(PTRACE_PEEKTEXT, proc->pid, in syscall_p()
[all …]
Dregs.c43 arm_get_register(struct process *proc, enum arm_register reg, uint32_t *lp) in arm_get_register() argument
46 long l = ptrace(PTRACE_PEEKUSER, proc->pid, (void *)(reg * 4L), 0); in arm_get_register()
54 arm_set_register(struct process *proc, enum arm_register reg, uint32_t lp) in arm_set_register() argument
56 return ptrace(PTRACE_PEEKUSER, proc->pid, in arm_set_register()
61 arm_get_register_offpc(struct process *proc, enum arm_register reg, in arm_get_register_offpc() argument
64 if (arm_get_register(proc, reg, lp) < 0) in arm_get_register_offpc()
72 arm_get_shifted_register(struct process *proc, uint32_t inst, int carry, in arm_get_shifted_register() argument
80 if (arm_get_register_offpc(proc, BITS(inst, 8, 11), &shift) < 0) in arm_get_shifted_register()
91 else if (arm_get_register(proc, rm, &res) < 0) in arm_get_shifted_register()
124 get_register_nocheck(struct process *proc, enum arm_register r) in get_register_nocheck() argument
[all …]
/external/ltrace/sysdeps/linux-gnu/mips/
Dtrace.c68 get_arch_dep(struct process *proc) in get_arch_dep() argument
90 syscall_p(struct process *proc, int status, int *sysnum) in syscall_p() argument
93 && WSTOPSIG(status) == (SIGTRAP | proc->tracesysgood)) { in syscall_p()
95 long pc = (long)get_instruction_pointer(proc); in syscall_p()
97 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()
111 if (proc->callstack_depth > 0 && in syscall_p()
112 proc->callstack[proc->callstack_depth - 1].is_syscall && in syscall_p()
113 proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) { in syscall_p()
147 int mips_next_pcs(struct process *proc, uint32_t pc, uint32_t *newpc) in mips_next_pcs() argument
[all …]
/external/sepolicy/
Dgenfs_contexts3 # proc labeling can be further refined (longest matching prefix).
4 genfscon proc / u:object_r:proc:s0
5 genfscon proc /net u:object_r:proc_net:s0
6 genfscon proc /net/xt_qtaguid/ctrl u:object_r:qtaguid_proc:s0
7 genfscon proc /cpuinfo u:object_r:proc_cpuinfo:s0
8 genfscon proc /sysrq-trigger u:object_r:proc_sysrq:s0
9 genfscon proc /sys/fs/protected_hardlinks u:object_r:proc_security:s0
10 genfscon proc /sys/fs/protected_symlinks u:object_r:proc_security:s0
11 genfscon proc /sys/fs/suid_dumpable u:object_r:proc_security:s0
12 genfscon proc /sys/kernel/core_pattern u:object_r:usermodehelper:s0
[all …]
/external/toybox/tests/
Dpgrep.test15 proc=$!
16 echo "# Process created with id: $proc"
19 proc_parent=`cat /proc/${proc}/stat | awk '{ print $4 }'`
20 echo "# Parent Process id of $proc is $proc_parent"
23 testing "pgrep pattern" "pgrep yes" "$proc\n" "" ""
24 testing "pgrep wildCardPattern" "pgrep ^y.*s$" "$proc\n" "" ""
25 testing "pgrep -l pattern" "pgrep -l yes" "$proc yes\n" "" ""
26 testing "pgrep -f pattern" "pgrep -f yes" "$proc\n" "" ""
27 testing "pgrep -n pattern" "pgrep -n yes" "$proc\n" "" ""
28 testing "pgrep -o pattern" "pgrep -o yes" "$proc\n" "" ""
[all …]

12345678910>>...26