diff options
author | Yann Sionneau <ysionneau@kalray.eu> | 2023-09-14 16:55:22 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2023-09-14 17:25:01 +0200 |
commit | b49013485476dd508ae82e6143e1e73795e4c348 (patch) | |
tree | f00fffb0fa0b23b9d86e3b3405ad1c18a50f2895 /libc | |
parent | 1a912c255f0def201615985bfd30827a234cdc67 (diff) |
kvx: align specification of user regs
Align the specification of the ptrace interface with how it is specified on RISC-V.
Signed-off-by: Yann Sionneau <ysionneau@kalray.eu>
Diffstat (limited to 'libc')
-rw-r--r-- | libc/sysdeps/linux/kvx/sys/procfs.h | 13 | ||||
-rw-r--r-- | libc/sysdeps/linux/kvx/sys/ucontext.h | 5 | ||||
-rw-r--r-- | libc/sysdeps/linux/kvx/sys/user.h | 28 |
3 files changed, 7 insertions, 39 deletions
diff --git a/libc/sysdeps/linux/kvx/sys/procfs.h b/libc/sysdeps/linux/kvx/sys/procfs.h index bbbfb838e..b72322888 100644 --- a/libc/sysdeps/linux/kvx/sys/procfs.h +++ b/libc/sysdeps/linux/kvx/sys/procfs.h @@ -31,20 +31,15 @@ #include <sys/time.h> #include <sys/types.h> #include <sys/user.h> +#include <sys/ucontext.h> -__BEGIN_DECLS +#define ELF_NGREG NGREG -/* Type for a general-purpose register. */ typedef unsigned long elf_greg_t; -/* No FP registers for kvx. */ +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; typedef struct {} elf_fpregset_t; -/* And the whole bunch of them. We could have used `struct - pt_regs' directly in the typedef, but tradition says that - the register set is an array, which does have some peculiar - semantics, so leave it that way. */ -#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t)) -typedef elf_greg_t elf_gregset_t[ELF_NGREG]; +__BEGIN_DECLS /* Signal info. */ struct elf_siginfo diff --git a/libc/sysdeps/linux/kvx/sys/ucontext.h b/libc/sysdeps/linux/kvx/sys/ucontext.h index 548892389..a97b83cad 100644 --- a/libc/sysdeps/linux/kvx/sys/ucontext.h +++ b/libc/sysdeps/linux/kvx/sys/ucontext.h @@ -12,12 +12,11 @@ #include <signal.h> #include <bits/sigcontext.h> +#define NGREG 70 + /* Type for general register. */ typedef unsigned long greg_t; -/* Number of general registers. */ -#define NGREG 64 - typedef struct ucontext { unsigned long uc_flags; struct ucontext *uc_link; diff --git a/libc/sysdeps/linux/kvx/sys/user.h b/libc/sysdeps/linux/kvx/sys/user.h index 2e228ff19..c871f1a03 100644 --- a/libc/sysdeps/linux/kvx/sys/user.h +++ b/libc/sysdeps/linux/kvx/sys/user.h @@ -1,27 +1 @@ -/* - * This file is subject to the terms and conditions of the LGPL V2.1 - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * - * Copyright (C) 2019 Kalray Inc. - */ - -#ifndef _SYS_USER_H -#define _SYS_USER_H 1 - -struct user_regs_struct -{ - /* GPR */ - unsigned long long gpr_regs[64]; - - /* SFR */ - unsigned long lc; - unsigned long le; - unsigned long ls; - unsigned long ra; - - unsigned long cs; - unsigned long spc; -}; - -#endif +/* This file is not needed, but in practice gdb might try to include it. */ |