/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* * arch/wasm32/include/uapi/asm/ptrace.h * * wasm32 has no introspectable hardware register file: each Worker is a * private VM with no abstraction for "the registers" outside the * function-call WebAssembly model. We expose a minimal user_regs_struct * for ptrace() ABI completeness; in practice the only field that ever * varies meaningfully is `pc`, which we use as a logical instruction * pointer carried by HardwareJS (== the call-stack frame the Worker is * currently executing inside). */ #ifndef _ASM_WASM32_PTRACE_H #define _ASM_WASM32_PTRACE_H #ifndef __ASSEMBLY__ #include struct user_regs_struct { __u32 pc; /* logical instruction pointer (HardwareJS-provided) */ __u32 sp; /* logical stack pointer in memory 0 */ __u32 a0; __u32 a1; __u32 a2; __u32 a3; __u32 a4; __u32 a5; /* the six syscall arg registers */ __u32 ret; /* syscall return value */ }; #endif /* !__ASSEMBLY__ */ #endif /* _ASM_WASM32_PTRACE_H */