diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2018-05-27 14:02:17 -0500 |
---|---|---|
committer | Stafford Horne <shorne@gmail.com> | 2018-07-03 22:40:33 +0900 |
commit | e8f29049b1e904068ce874e6a40b6ad18b26e121 (patch) | |
tree | 954be452e037a4384971bf9c9554bea2ebad70d1 /linux-user/openrisc/target_syscall.h | |
parent | ecbed7280c832220d9ac8ea7c0b6163393e3cb1a (diff) |
linux-user: Implement signals for openrisc
All of the existing code was boilerplate from elsewhere,
and would crash the guest upon the first signal.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Stafford Horne <shorne@gmail.com>
---
v2:
Add a comment to the new definition of target_pt_regs.
Install the signal mask into the ucontext.
v3:
Incorporate feedback from Laurent.
Diffstat (limited to 'linux-user/openrisc/target_syscall.h')
-rw-r--r-- | linux-user/openrisc/target_syscall.h | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/linux-user/openrisc/target_syscall.h b/linux-user/openrisc/target_syscall.h index 03104f80af..d586d2a018 100644 --- a/linux-user/openrisc/target_syscall.h +++ b/linux-user/openrisc/target_syscall.h @@ -1,27 +1,15 @@ #ifndef OPENRISC_TARGET_SYSCALL_H #define OPENRISC_TARGET_SYSCALL_H +/* Note that in linux/arch/openrisc/include/uapi/asm/ptrace.h, + * this is called user_regs_struct. Given that this is what + * is used within struct sigcontext we need this definition. + * However, elfload.c wants this name. + */ struct target_pt_regs { - union { - struct { - /* Named registers */ - uint32_t sr; /* Stored in place of r0 */ - target_ulong sp; /* r1 */ - }; - struct { - /* Old style */ - target_ulong offset[2]; - target_ulong gprs[30]; - }; - struct { - /* New style */ - target_ulong gpr[32]; - }; - }; - target_ulong pc; - target_ulong orig_gpr11; /* For restarting system calls */ - uint32_t syscallno; /* Syscall number (used by strace) */ - target_ulong dummy; /* Cheap alignment fix */ + abi_ulong gpr[32]; + abi_ulong pc; + abi_ulong sr; }; #define UNAME_MACHINE "openrisc" |