Path: blob/master/arch/loongarch/include/uapi/asm/ptrace.h
48889 views
/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */1/*2* Author: Hanlu Li <[email protected]>3* Huacai Chen <[email protected]>4*5* Copyright (C) 2020-2022 Loongson Technology Corporation Limited6*/7#ifndef _UAPI_ASM_PTRACE_H8#define _UAPI_ASM_PTRACE_H910#include <linux/types.h>1112/*13* For PTRACE_{POKE,PEEK}USR. 0 - 31 are GPRs,14* 32 is syscall's original ARG0, 33 is PC, 34 is BADVADDR.15*/16#define GPR_BASE 017#define GPR_NUM 3218#define GPR_END (GPR_BASE + GPR_NUM - 1)19#define ARG0 (GPR_END + 1)20#define PC (GPR_END + 2)21#define BADVADDR (GPR_END + 3)2223#define NUM_FPU_REGS 322425struct user_pt_regs {26/* Main processor registers. */27unsigned long regs[32];2829/* Original syscall arg0. */30unsigned long orig_a0;3132/* Special CSR registers. */33unsigned long csr_era;34unsigned long csr_badv;35unsigned long reserved[10];36} __attribute__((aligned(8)));3738struct user_fp_state {39__u64 fpr[32];40__u64 fcc;41__u32 fcsr;42};4344struct user_lsx_state {45/* 32 registers, 128 bits width per register. */46__u64 vregs[32*2];47};4849struct user_lasx_state {50/* 32 registers, 256 bits width per register. */51__u64 vregs[32*4];52};5354struct user_lbt_state {55__u64 scr[4];56__u32 eflags;57__u32 ftop;58};5960struct user_watch_state {61__u64 dbg_info;62struct {63#if __BITS_PER_LONG == 3264__u32 addr;65__u32 mask;66#else67__u64 addr;68__u64 mask;69#endif70__u32 ctrl;71__u32 pad;72} dbg_regs[8];73};7475struct user_watch_state_v2 {76__u64 dbg_info;77struct {78#if __BITS_PER_LONG == 3279__u32 addr;80__u32 mask;81#else82__u64 addr;83__u64 mask;84#endif85__u32 ctrl;86__u32 pad;87} dbg_regs[14];88};8990#define PTRACE_SYSEMU 0x1f91#define PTRACE_SYSEMU_SINGLESTEP 0x209293#endif /* _UAPI_ASM_PTRACE_H */949596