Changeset View
Changeset View
Standalone View
Standalone View
head/sys/sys/ptrace.h
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | |||||
#define PT_TO_SCE 20 | #define PT_TO_SCE 20 | ||||
#define PT_TO_SCX 21 | #define PT_TO_SCX 21 | ||||
#define PT_SYSCALL 22 | #define PT_SYSCALL 22 | ||||
#define PT_FOLLOW_FORK 23 | #define PT_FOLLOW_FORK 23 | ||||
#define PT_LWP_EVENTS 24 /* report LWP birth and exit */ | #define PT_LWP_EVENTS 24 /* report LWP birth and exit */ | ||||
#define PT_GET_EVENT_MASK 25 /* get mask of optional events */ | |||||
#define PT_SET_EVENT_MASK 26 /* set mask of optional events */ | |||||
#define PT_GETREGS 33 /* get general-purpose registers */ | #define PT_GETREGS 33 /* get general-purpose registers */ | ||||
#define PT_SETREGS 34 /* set general-purpose registers */ | #define PT_SETREGS 34 /* set general-purpose registers */ | ||||
#define PT_GETFPREGS 35 /* get floating-point registers */ | #define PT_GETFPREGS 35 /* get floating-point registers */ | ||||
#define PT_SETFPREGS 36 /* set floating-point registers */ | #define PT_SETFPREGS 36 /* set floating-point registers */ | ||||
#define PT_GETDBREGS 37 /* get debugging registers */ | #define PT_GETDBREGS 37 /* get debugging registers */ | ||||
#define PT_SETDBREGS 38 /* set debugging registers */ | #define PT_SETDBREGS 38 /* set debugging registers */ | ||||
#define PT_VM_TIMESTAMP 40 /* Get VM version (timestamp) */ | #define PT_VM_TIMESTAMP 40 /* Get VM version (timestamp) */ | ||||
#define PT_VM_ENTRY 41 /* Get VM map (entry) */ | #define PT_VM_ENTRY 41 /* Get VM map (entry) */ | ||||
#define PT_FIRSTMACH 64 /* for machine-specific requests */ | #define PT_FIRSTMACH 64 /* for machine-specific requests */ | ||||
#include <machine/ptrace.h> /* machine-specific requests, if any */ | #include <machine/ptrace.h> /* machine-specific requests, if any */ | ||||
/* Events used with PT_GET_EVENT_MASK and PT_SET_EVENT_MASK */ | |||||
#define PTRACE_EXEC 0x0001 | |||||
#define PTRACE_SCE 0x0002 | |||||
#define PTRACE_SCX 0x0004 | |||||
#define PTRACE_SYSCALL (PTRACE_SCE | PTRACE_SCX) | |||||
#define PTRACE_FORK 0x0008 | |||||
#define PTRACE_LWP 0x0010 | |||||
#define PTRACE_DEFAULT (PTRACE_EXEC) | |||||
struct ptrace_io_desc { | struct ptrace_io_desc { | ||||
int piod_op; /* I/O operation */ | int piod_op; /* I/O operation */ | ||||
void *piod_offs; /* child offset */ | void *piod_offs; /* child offset */ | ||||
void *piod_addr; /* parent offset */ | void *piod_addr; /* parent offset */ | ||||
size_t piod_len; /* request length */ | size_t piod_len; /* request length */ | ||||
}; | }; | ||||
/* | /* | ||||
Show All 40 Lines | struct ptrace_vm_entry { | ||||
u_int pve_prot; /* Protection of memory range. */ | u_int pve_prot; /* Protection of memory range. */ | ||||
u_int pve_pathlen; /* Size of path. */ | u_int pve_pathlen; /* Size of path. */ | ||||
long pve_fileid; /* File ID. */ | long pve_fileid; /* File ID. */ | ||||
uint32_t pve_fsid; /* File system ID. */ | uint32_t pve_fsid; /* File system ID. */ | ||||
char *pve_path; /* Path name of object. */ | char *pve_path; /* Path name of object. */ | ||||
}; | }; | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
/* | |||||
* The flags below are used for ptrace(2) tracing and have no relation | |||||
* to procfs. They are stored in struct proc's p_stops member. | |||||
*/ | |||||
#define S_PT_SCE 0x000010000 | |||||
#define S_PT_SCX 0x000020000 | |||||
int ptrace_set_pc(struct thread *_td, unsigned long _addr); | int ptrace_set_pc(struct thread *_td, unsigned long _addr); | ||||
int ptrace_single_step(struct thread *_td); | int ptrace_single_step(struct thread *_td); | ||||
int ptrace_clear_single_step(struct thread *_td); | int ptrace_clear_single_step(struct thread *_td); | ||||
#ifdef __HAVE_PTRACE_MACHDEP | #ifdef __HAVE_PTRACE_MACHDEP | ||||
int cpu_ptrace(struct thread *_td, int _req, void *_addr, int _data); | int cpu_ptrace(struct thread *_td, int _req, void *_addr, int _data); | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines |