|
libexplain
1.4.D001
|
#include <libexplain/ac/errno.h>#include <libexplain/ac/sys/ptrace.h>#include <libexplain/output.h>#include <libexplain/ptrace.h>Go to the source code of this file.
Functions | |
| long | explain_ptrace_or_die (int request, pid_t pid, void *addr, void *data) |
| static int | ptrace (int request, pid_t pid, void *addr, void *data) |
| long | explain_ptrace_on_error (int request, pid_t pid, void *addr, void *data) |
| long explain_ptrace_on_error | ( | int | request, |
| pid_t | pid, | ||
| void * | addr, | ||
| void * | data | ||
| ) |
The explain_ptrace_on_error function is used to call the ptrace(2) system call. On failure an explanation will be printed to stderr, obtained from the explain_ptrace(3) function.
| request | The request, exactly as to be passed to the ptrace(2) system call. |
| pid | The pid, exactly as to be passed to the ptrace(2) system call. |
| addr | The addr, exactly as to be passed to the ptrace(2) system call. |
| data | The data, exactly as to be passed to the ptrace(2) system call. |
long result = explain_ptrace_on_error(request, pid, addr, data); if (result < 0) { ...cope with error ...no need to print error message }
Definition at line 55 of file ptrace_or_die.c.
| long explain_ptrace_or_die | ( | int | request, |
| pid_t | pid, | ||
| void * | addr, | ||
| void * | data | ||
| ) |
The explain_ptrace_or_die function is used to call the ptrace(2) system call. On failure an explanation will be printed to stderr, obtained from the explain_ptrace(3) function, and then the process terminates by calling exit(EXIT_FAILURE).
| request | The request, exactly as to be passed to the ptrace(2) system call. |
| pid | The pid, exactly as to be passed to the ptrace(2) system call. |
| addr | The addr, exactly as to be passed to the ptrace(2) system call. |
| data | The data, exactly as to be passed to the ptrace(2) system call. |
long result = explain_ptrace_or_die(request, pid, addr, data);
Definition at line 27 of file ptrace_or_die.c.
| static int ptrace | ( | int | request, |
| pid_t | pid, | ||
| void * | addr, | ||
| void * | data | ||
| ) | [static] |
Definition at line 42 of file ptrace_or_die.c.
1.7.6.1