Path: blob/master/arch/loongarch/include/uapi/asm/ptrace.h
26512 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#ifndef __KERNEL__13#include <stdint.h>14#endif1516/*17* For PTRACE_{POKE,PEEK}USR. 0 - 31 are GPRs,18* 32 is syscall's original ARG0, 33 is PC, 34 is BADVADDR.19*/20#define GPR_BASE 021#define GPR_NUM 3222#define GPR_END (GPR_BASE + GPR_NUM - 1)23#define ARG0 (GPR_END + 1)24#define PC (GPR_END + 2)25#define BADVADDR (GPR_END + 3)2627#define NUM_FPU_REGS 322829struct user_pt_regs {30/* Main processor registers. */31unsigned long regs[32];3233/* Original syscall arg0. */34unsigned long orig_a0;3536/* Special CSR registers. */37unsigned long csr_era;38unsigned long csr_badv;39unsigned long reserved[10];40} __attribute__((aligned(8)));4142struct user_fp_state {43uint64_t fpr[32];44uint64_t fcc;45uint32_t fcsr;46};4748struct user_lsx_state {49/* 32 registers, 128 bits width per register. */50uint64_t vregs[32*2];51};5253struct user_lasx_state {54/* 32 registers, 256 bits width per register. */55uint64_t vregs[32*4];56};5758struct user_lbt_state {59uint64_t scr[4];60uint32_t eflags;61uint32_t ftop;62};6364struct user_watch_state {65uint64_t dbg_info;66struct {67uint64_t addr;68uint64_t mask;69uint32_t ctrl;70uint32_t pad;71} dbg_regs[8];72};7374struct user_watch_state_v2 {75uint64_t dbg_info;76struct {77uint64_t addr;78uint64_t mask;79uint32_t ctrl;80uint32_t pad;81} dbg_regs[14];82};8384#define PTRACE_SYSEMU 0x1f85#define PTRACE_SYSEMU_SINGLESTEP 0x208687#endif /* _UAPI_ASM_PTRACE_H */888990