Rizin
unix-like reverse engineering framework and cli tools
|
#include <ptrace_wrap.h>
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <signal.h>
#include <rz_util/rz_sys.h>
Go to the source code of this file.
Functions | |
static void * | th_run (ptrace_wrap_instance *inst) |
int | ptrace_wrap_instance_start (ptrace_wrap_instance *inst) |
void | ptrace_wrap_instance_stop (ptrace_wrap_instance *inst) |
static void | wrap_ptrace (ptrace_wrap_instance *inst) |
static void | wrap_fork (ptrace_wrap_instance *inst) |
static void | wrap_func (ptrace_wrap_instance *inst) |
long | ptrace_wrap (ptrace_wrap_instance *inst, ptrace_wrap_ptrace_request request, pid_t pid, void *addr, void *data) |
pid_t | ptrace_wrap_fork (ptrace_wrap_instance *inst, void(*child_callback)(void *), void *child_callback_user) |
void * | ptrace_wrap_func (ptrace_wrap_instance *inst, ptrace_wrap_func_func func, void *user) |
long ptrace_wrap | ( | ptrace_wrap_instance * | inst, |
ptrace_wrap_ptrace_request | request, | ||
pid_t | pid, | ||
void * | addr, | ||
void * | data | ||
) |
Definition at line 90 of file ptrace_wrap.c.
References addr, pid, ptrace, ptrace_wrap_request_t::ptrace, ptrace_wrap_instance_t::ptrace_result, PTRACE_WRAP_REQUEST_TYPE_PTRACE, request, ptrace_wrap_instance_t::request, ptrace_wrap_instance_t::request_sem, ptrace_wrap_instance_t::result_sem, sem_post(), sem_wait(), ptrace_wrap_instance_t::th, and ptrace_wrap_request_t::type.
pid_t ptrace_wrap_fork | ( | ptrace_wrap_instance * | inst, |
void(*)(void *) | child_callback, | ||
void * | child_callback_user | ||
) |
Definition at line 108 of file ptrace_wrap.c.
References ptrace_wrap_request_t::fork, ptrace_wrap_instance_t::fork_result, PTRACE_WRAP_REQUEST_TYPE_FORK, r, ptrace_wrap_instance_t::request, ptrace_wrap_instance_t::request_sem, ptrace_wrap_instance_t::result_sem, sem_post(), sem_wait(), ptrace_wrap_instance_t::th, and ptrace_wrap_request_t::type.
void* ptrace_wrap_func | ( | ptrace_wrap_instance * | inst, |
ptrace_wrap_func_func | func, | ||
void * | user | ||
) |
Definition at line 130 of file ptrace_wrap.c.
References ptrace_wrap_request_t::func, ptrace_wrap_instance_t::func_result, PTRACE_WRAP_REQUEST_TYPE_FUNC, ptrace_wrap_instance_t::request, ptrace_wrap_instance_t::request_sem, ptrace_wrap_instance_t::result_sem, sem_post(), sem_wait(), ptrace_wrap_instance_t::th, and ptrace_wrap_request_t::type.
int ptrace_wrap_instance_start | ( | ptrace_wrap_instance * | inst | ) |
Definition at line 14 of file ptrace_wrap.c.
References NULL, r, ptrace_wrap_instance_t::request_sem, ptrace_wrap_instance_t::result_sem, sem_destroy(), sem_init(), ptrace_wrap_instance_t::th, and th_run().
void ptrace_wrap_instance_stop | ( | ptrace_wrap_instance * | inst | ) |
Definition at line 36 of file ptrace_wrap.c.
References NULL, PTRACE_WRAP_REQUEST_TYPE_STOP, ptrace_wrap_instance_t::request, ptrace_wrap_instance_t::request_sem, ptrace_wrap_instance_t::result_sem, sem_destroy(), sem_post(), ptrace_wrap_instance_t::th, and ptrace_wrap_request_t::type.
Referenced by rz_io_fini().
|
static |
Definition at line 68 of file ptrace_wrap.c.
References NULL, PTRACE_WRAP_REQUEST_TYPE_FORK, PTRACE_WRAP_REQUEST_TYPE_FUNC, PTRACE_WRAP_REQUEST_TYPE_PTRACE, PTRACE_WRAP_REQUEST_TYPE_STOP, ptrace_wrap_instance_t::request, ptrace_wrap_instance_t::request_sem, ptrace_wrap_instance_t::result_sem, sem_post(), sem_wait(), ptrace_wrap_request_t::type, wrap_fork(), wrap_func(), and wrap_ptrace().
Referenced by ptrace_wrap_instance_start().
|
static |
Definition at line 55 of file ptrace_wrap.c.
References ptrace_wrap_request_t::fork, ptrace_wrap_instance_t::fork_result, r, ptrace_wrap_instance_t::request, and rz_sys_fork().
Referenced by th_run().
|
static |
Definition at line 64 of file ptrace_wrap.c.
References ptrace_wrap_request_t::func, ptrace_wrap_instance_t::func_result, and ptrace_wrap_instance_t::request.
Referenced by th_run().
|
static |
Definition at line 44 of file ptrace_wrap.c.
References ptrace, ptrace_wrap_request_t::ptrace, ptrace_wrap_instance_t::ptrace_result, and ptrace_wrap_instance_t::request.
Referenced by th_run().