Changeset View
Changeset View
Standalone View
Standalone View
usr.bin/truss/setup.c
Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | |||||
static sig_atomic_t detaching; | static sig_atomic_t detaching; | ||||
static void enter_syscall(struct trussinfo *, struct threadinfo *, | static void enter_syscall(struct trussinfo *, struct threadinfo *, | ||||
struct ptrace_lwpinfo *); | struct ptrace_lwpinfo *); | ||||
static void new_proc(struct trussinfo *, pid_t, lwpid_t); | static void new_proc(struct trussinfo *, pid_t, lwpid_t); | ||||
static struct procabi cloudabi32 = { | |||||
.type = "CloudABI32", | |||||
.abi = SYSDECODE_ABI_CLOUDABI32, | |||||
.pointer_size = sizeof(uint32_t), | |||||
.extra_syscalls = STAILQ_HEAD_INITIALIZER(cloudabi32.extra_syscalls), | |||||
.syscalls = { NULL } | |||||
}; | |||||
static struct procabi cloudabi64 = { | |||||
.type = "CloudABI64", | |||||
.abi = SYSDECODE_ABI_CLOUDABI64, | |||||
.pointer_size = sizeof(uint64_t), | |||||
.extra_syscalls = STAILQ_HEAD_INITIALIZER(cloudabi64.extra_syscalls), | |||||
.syscalls = { NULL } | |||||
}; | |||||
static struct procabi freebsd = { | static struct procabi freebsd = { | ||||
.type = "FreeBSD", | .type = "FreeBSD", | ||||
.abi = SYSDECODE_ABI_FREEBSD, | .abi = SYSDECODE_ABI_FREEBSD, | ||||
.pointer_size = sizeof(void *), | .pointer_size = sizeof(void *), | ||||
.extra_syscalls = STAILQ_HEAD_INITIALIZER(freebsd.extra_syscalls), | .extra_syscalls = STAILQ_HEAD_INITIALIZER(freebsd.extra_syscalls), | ||||
.syscalls = { NULL } | .syscalls = { NULL } | ||||
}; | }; | ||||
Show All 26 Lines | static struct procabi linux32 = { | ||||
.abi = SYSDECODE_ABI_LINUX32, | .abi = SYSDECODE_ABI_LINUX32, | ||||
.pointer_size = sizeof(uint32_t), | .pointer_size = sizeof(uint32_t), | ||||
.extra_syscalls = STAILQ_HEAD_INITIALIZER(linux32.extra_syscalls), | .extra_syscalls = STAILQ_HEAD_INITIALIZER(linux32.extra_syscalls), | ||||
.syscalls = { NULL } | .syscalls = { NULL } | ||||
}; | }; | ||||
#endif | #endif | ||||
static struct procabi_table abis[] = { | static struct procabi_table abis[] = { | ||||
{ "CloudABI ELF32", &cloudabi32 }, | |||||
{ "CloudABI ELF64", &cloudabi64 }, | |||||
#if __SIZEOF_POINTER__ == 4 | #if __SIZEOF_POINTER__ == 4 | ||||
{ "FreeBSD ELF32", &freebsd }, | { "FreeBSD ELF32", &freebsd }, | ||||
#elif __SIZEOF_POINTER__ == 8 | #elif __SIZEOF_POINTER__ == 8 | ||||
{ "FreeBSD ELF64", &freebsd }, | { "FreeBSD ELF64", &freebsd }, | ||||
{ "FreeBSD ELF32", &freebsd32 }, | { "FreeBSD ELF32", &freebsd32 }, | ||||
#else | #else | ||||
#error "Unsupported pointer size" | #error "Unsupported pointer size" | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 696 Lines • Show Last 20 Lines |