#include <sys/fasttrap.h>
sys/fasttrap.h
7 macros · 4 typedefs · 2 enums · 2 structs
#define FASTTRAPIOC _IO('d', 0)underlying type unsigned int
| DTFTP_NONE | 0 | |
| DTFTP_ENTRY | 1 | |
| DTFTP_RETURN | 2 | |
| DTFTP_OFFSETS | 3 | |
| DTFTP_POST_OFFSETS | 4 | |
| DTFTP_IS_ENABLED | 5 | |
underlying type unsigned int
| DTFTP_PROVIDER_NONE | 0 | |
| DTFTP_PROVIDER_USDT | 1 | |
| DTFTP_PROVIDER_PID | 2 | |
| DTFTP_PROVIDER_OBJC | 3 | |
| DTFTP_PROVIDER_ONESHOT | 4 | |
Moved from fasttrap.c
#define FASTTRAP_PID_NAME "pid"
#define FASTTRAP_OBJC_NAME "objc"
#define FASTTRAP_ONESHOT_NAME "oneshot"
size 240, align 8
| pid_t | ftps_pid | |
| fasttrap_provider_type_t | ftps_provider_type | |
| fasttrap_probe_type_t | ftps_probe_type | |
| uint32_t | ftps_arch_subinfo | For any additional per probe architecture specific data |
| char[128] | ftps_func | |
| char[64] | ftps_mod | |
| uint64_t | ftps_pc | |
| uint64_t | ftps_size | |
| uint64_t | ftps_noffs | |
| uint64_t[1] | ftps_offs | |
size 16, align 8
| uint64_t | ftiq_pc | |
| pid_t | ftiq_pid | |
| fasttrap_instr_t | ftiq_instr | |
To support the fasttrap provider from very early in a process's life,
the run-time linker, ld.so.1, has a program header of type PT_SUNWDTRACE
which points to a data object which must be PT_SUNWDTRACE_SIZE bytes.
This structure mimics the fasttrap provider section of the ulwp_t structure.
When the fasttrap provider is changed to require new or different
instructions, the data object in ld.so.1 and the thread initializers in libc
(libc_init() and _thrp_create()) need to be updated to include the new
instructions, and PT_SUNWDTRACE needs to be changed to a new unique number
(while the old value gets assigned something like PT_SUNWDTRACE_1). Since the
linker must be backward compatible with old Solaris releases, it must have
program headers for each of the PT_SUNWDTRACE versions. The kernel's
elfexec() function only has to look for the latest version of the
PT_SUNWDTRACE program header.
#define PT_SUNWDTRACE_SIZE FASTTRAP_SUNWDTRACE_SIZE